|
|
|
|
|
- Overview
- Different modes
- Modifying the standard behavior of sockets
- Optimizing the network frames
- Optimizing the connections for an IP address
- Re-using an address that is already used
- Using the default settings
Managing sockets with WINDEV, WEBDEV and WINDEV Mobile
WINDEV, WEBDEV and WINDEV Mobile include several functions allowing you to perform an advanced management of sockets. A socket is a communication resource used by applications to communicate from one computer to another regardless of the type of network. This communication mode can be used, for example, to establish a communication between computers connected by Internet. WINDEV, WEBDEV and WINDEV Mobile allow you to manage: - The standard sockets.
- The UDP sockets.
- The sockets by infrared.
- SSL sockets.
Examples for using sockets: - manage a messaging in real-time.
- access to a news server (forum).
A WINDEV or WEBDEV application can manage the sockets according to different modes: Modifying the standard behavior of sockets Optimizing the network frames By default, in Windows, the network frames are optimized according to the Nagle algorithm. To communicate with a system that does not support this optimization (some embedded industrial operating systems for example), this optimization must be disabled. To do so, enter the following code: Socket.Option = SocketNagleOff
Re-using an address that is already used By default, SocketCreate allows you to reuse an address (already used by the application itself or by another application). To forbid this operating mode, type the following line of code: Socket.Option = SocketNoReuseAddress
Note By extension, this option can be used to determine whether an address or port is already in use. In this case, SocketCreate returns an error. Using the default settings The following code allows you to restore the default setting: Socket.Option = SocketOptionDefault
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|