Here it is!
Rem Winsock.dll Version 1.1 API declarations for use with Visual Basic
Rem
Rem The type to be used in all socket references.
Rem
Global sockettype As Integer
Global Const FD_SETSIZE = 64
Type fd_set_type
fd_count As Integer
fd_array(FD_SETSIZE) As Integer
End Type
Global FD_SET As fd_set_type
Declare Function FD_ISSET Lib "winsock.dll" Alias "__WSAFDIsSet" (ByVal s
As Integer,
passed_set As fd_set_type) As Integer
Rem
Rem Structure used in select() call, taken from the BSD file sys/time.h.
Rem
Type timeval
tv_sec As Long
tv_usec As Long
End Type
Type SockAddr_in
sin_family As Integer
sin_port As Integer
sin_addr As Long
sin_zero(7) As String * 1
End Type
Type in_addr
temp As Long
End Type
Type sockaddr
sa_family As Integer
sa_data(14) As Integer
End Type
Global Const WSADESCRIPTION_LEN = 256
Global Const WSASYS_STATUS_LEN = 128
Type WSAdata_type
wVersion As Integer
wHighVersion As Integer
szDescription As String * 257
szSystemStatus As String * 129
iMaxSockets As Integer
iMaxUdpDg As Integer
lpVendorInfo As String * 200
End Type
Global WSAdata As WSAdata_type
Type sockproto
sp_family As Integer
sp_protocol As Integer
End Type
Type linger
l_onoff As Integer
l_linger As Integer
End Type
Rem Socket function prototypes
Declare Function Accept Lib "winsock.dll" (ByVal s As Integer, addr As
SockAddr_in, addrlen As
Integer) As Integer
Declare Function Bind Lib "winsock.dll" (ByVal s As Integer, addr As
SockAddr_in, ByVal namelen
As Integer) As Integer
Declare Function closesocket Lib "winsock.dll" (ByVal s As Integer) As
Integer
Declare Function htonl Lib "winsock.dll" (ByVal a As Long) As Long
Declare Function inet_addr Lib "winsock.dll" (ByVal s As String) As Long
Declare Function inet_ntoa Lib "winsock.dll" (ByVal in As Long) As Long
Declare Function ntohl Lib "winsock.dll" (ByVal a As Long) As Long
Declare Function socket Lib "winsock.dll" (ByVal af As Integer, ByVal
typesock As Integer, ByVal
protocol As Integer) As Integer
Declare Function htons Lib "winsock.dll" (ByVal a As Integer) As Integer
Declare Function ntohs Lib "winsock.dll" (ByVal a As Integer) As Integer
Declare Function Connect Lib "winsock.dll" (ByVal sock As Integer,
sockstruct As SockAddr_in,
ByVal structlen As Integer) As Integer
Declare Function send Lib "winsock.dll" (ByVal sock As Integer, ByVal msg
As String, ByVal
msglen As Integer, ByVal flag As Integer) As Integer
Declare Function Recv Lib "winsock.dll" (ByVal sock As Integer, ByVal msg
As String, ByVal
msglen As Integer, ByVal flag As Integer) As Integer
Declare Function Listen Lib "winsock.dll" (ByVal s As Integer, ByVal
backlog As Integer) As Integer
Rem Microsoft Windows Extension function prototypes
Declare Function WSaStartup Lib "winsock.dll" (ByVal a As Integer, b As
WSAdata_type) As
Integer
Declare Function WSACleanup Lib "winsock.dll" () As Integer
Rem WINSOCK constants
Global Const SOCK_STREAM = 1
Global Const SOCK_DGRAM = 2
Global Const AF_INET = 2