ONLINE HELP WINDEV, WEBDEV AND WINDEV MOBILE
Version: 151617181920212223242526
Connecting to a socket Hide the details
True if the function was successful,False otherwise. In the event of an error, it is possible to find out the details of the error using the ErrorInfo function.
Name that will be given to the connection opened on the server socket. This name will be used by all socket functions.
Port number of socket. If you are using a socket associated with a preset protocol, use the port number associated with the protocol.If the socket was created by a WINDEV application, this number must be included between 5 000 and 65 000. In this case, the number must be identical to the port number specified in SocketCreate.
Address of server. If this parameter is not specified, the server is sought on the current computer. This address can be given in the following format:IP address in XXX.XXX.XXX.XXX format (125.5.110.100 for example).URL containing the server name (www.windev.com for example). This syntax is recommended. The address can also correspond to the IP address returned by NetIPAddress.
Maximum timeout (in milliseconds) for establishing the connection. This delay is only used if the server refuses the connection (function SocketDeny). In this case, the connection will not be locking. This parameter can correspond to: an integer corresponding to the number of milliseconds,a Duration variable,Versions 23 and laterthe direct indication of duration (1 s or 10 ms for example). New in version 23the direct indication of duration (1 s or 10 ms for example). the direct indication of duration (1 s or 10 ms for example). This time-out is set to 5000 milliseconds by default (5 seconds). See remarks for more details. This parameter is ignored.
Connecting to a WebSocket Hide the details
Name that will be given when connecting to the server. This name will be used by all socket functions. Caution: The socket name is case sensitive.
Address of the WebSockets server that will be used for the connection. This address has the following format: ws[s]://server[:port][/directoryX/.../]. In this case:the ws prefix indicates that the server is a WebSockets server. wss is used for a secure WebSockets server.server corresponds to the server address in the following format: server name, domain name or IP address of server.port corresponds to the number of the communication port used to dialog with the server. This number must be identical to the port number specified in SocketCreate if the WebSockets server was created in WLanguage with WINDEV or WEBDEV.directoryX corresponds to the possible virtual directories of server.
Name of WLanguage procedure written in browser code ("callback" procedure). Name of procedure called when the connection to the server is established. This procedure is used to send a message to the server with SocketWrite.This procedure has the following format: PROCEDURE <Procedure Name>(<Event>, <Message>) where: <Event> corresponds to one of the following constants:SocketOpeningThe socket is connected to the server. You have the ability to send messages. SocketClosingThe socket is closed. The <Message> parameter contains a code that indicates the reason for closing.SocketErrorAn error occurred during the communication with the server. The <Message> parameter is always empty.SocketMessageThe socket received a message. The <Message> parameter contains data relative to the message.<Message> corresponds to the message received as server response according to the <Event>.Remark: There is no need to pass parameters to this procedure. Indeed, these parameters are automatically filled.
Protocol(s) corresponding to the format of WebSocket response. For example: "JSON", "XML". If this parameter is not specified or if it corresponds to an empty string, no protocol is used.
Optimizing the connections for an IP address
Timeout
Last update: 05/07/2020
Send a report | Local help
Searching...
I accept the terms of the license agreement
All you have to do is configure your product as follows: