ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Net functions
  • Example: Sending a message from the client computer to the server
NetSendBuffer (Example)
Example: Sending a message from the client computer to the server
The following example is used to send a message from the client computer to the server and to retrieve this message on the server with Event.
// On the client computer
ConnectFTP is int
ConnectFTP = NetConnect("148.61.125.245", FTPServer, "GUEST", "")
...
NetSendBuffer(ConnectFTP, "Coming soon")
// On the server
Event("GetBuffer", "*.*", 74)

// GetBuffer procedure
// Declaration of the structure pointed by _EVE.lParam
GetString is structure
        WData is int
        ISize is int
        pInfo is int
END

MyRecov is GetString
MyString is fixed string on 2000

// Retrieves the structure
Transfer(&MyRecov, _EVE.lParam, 12)
// Retrieves the information
Transfer(&MyString, MyRecov:pInfo, MyRecov:lSize)
Info(MyString)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help