ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Sockets
  • Optimizing the connections for an IP address
  • Connecting to an infrared port
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Connects a client computer to a given socket.
Remarks:
  • UDP-type sockets The UDP protocol is not a "connected" protocol, so the SocketConnect function cannot be used with the UDP protocol. To send or receive data with the UDP protocol, you must create a UDP socket (SocketCreateUDP) then send/receive data with the "special UDP" syntaxes of SocketWrite and SocketRead.
  • SSL sockets To send or receive data using the SSL protocol, you need to create an SSL socket (function SocketCreateSSL) and connect to it using function SocketConnectSSL.
  • Communication with non-WINDEV automation systems or applications: To simplify data exchange via socket, a transmission mode is initialized by default.. For a communication with an external module (non-WINDEV application, robot, ...), this transmission mode can prevent the communications from operating properly. SocketChangeTransmissionMode is used to change this transmission mode (the SocketNoEndTag constant allows you not to modify the frames read and written).
Reminder A socket is a communication resource used by applications to communicate from one machine to another, regardless of the type of network.
Example
Syntax
Remarks
Reports and Queries

Optimizing the connections for an IP address

When an IP address is passed to SocketConnect, the connection can be optimized by using the following code:
Socket.Option = SocketOptimizeIPConnection
This option is not enabled by default because the connection may fail in some configurations. However, it may be useful in some applications for which the performance is critical.
Remark: To restore default operation, simply use constant DefaultSocketOption:
Socket.Option = SocketOptionDefault
Reports and Queries

Connecting to an infrared port

To connect to a socket that uses an infrared port:
  1. Create a socket using the infrared port on the server (SocketCreateInfrared in a WINDEV application).
  2. In the client application (WINDEV application), use SocketConnectInfrared to connect to this socket.
Component: wd300com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
NO WORK WITH WebSocketServer
the syntax does not work for WebSocketServer in version 26.
CASTILLO / FRANCO
02 Jun. 2022

Last update: 04/02/2025

Send a report | Local help