Public Const INVALID_SOCKET = -1
Public Const INADDR_NONE = &HFFFF
Type sockaddr ' estructura
sin_family As Integer
sin_port As Integer
sin_addr As Long
Public Declare Function Connect Lib "wsock32.dll" Alias "connect" (ByVal s As Long, addr As sockaddr) As Long
Function ConnectSock() As Long
Dim sockin As sockaddr
If sockin.sin_addr = INADDR_NONE Then
ConnectSock = INVALID_SOCKET
Exit Function
no entiendo porqué cuando se comprueba si sockin.sin_addr = INADDR_NONE, osea si la dirección IP de 4 bytes según la Ordenación de bytes de la red (sockin.sin_addr) , es igual(=) a INADDR_NONE entonces(then) connectotsock = INVALID SOCKET.
¿No tendria que darse sockin.sin_addr = INADDR_NONE para que sea válida la conexión?