Winsock

This example uses Winsock to send and receive data from one computer to another using TCP or UDP protocols. It could be client to server or client to client communication. It could even be used with a peripheral device. IPv4 and IPv6 are supported. The library winsock64.pbl was built in PB 12.6 and has changes to support 32bit when run from the IDE or 32bit exe and support 64bit when run from a 64bit exe.

Win API Functions used:

accept
bind
closesocket
connect
FormatMessage
freeaddrinfo
getaddrinfo
gethostname
getpeername
getsockname
getsockopt
htons
inet_ntoa
ioctlsocket
listen
ntohs
OutputDebugString
recv
recvfrom
RtlMoveMemory
send
sendto
setsockopt
shutdown
socket
WNetGetUser
WSAAddressToString
WSAAsyncSelect
WSACleanup
WSAGetLastError
WSASetLastError
WSAStartup



——— Last updated 01/05/2018 ———