AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Comunicación / Sockets
  • 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
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Managing sockets with WINDEV, WEBDEV and WINDEV Mobile
Overview
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).
Different modes
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
WINDEVWEBDEV - Código Servidor

Optimizing the connections for an IP address

When an IP address is passed to the SocketConnect function, it is possible to optimize the connection 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.

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
Ver también
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

Señalar un error o enviar una sugerencia | Ayuda local