Difference between revisions of "Unit Winsock2"

From Ultibo.org
Jump to: navigation, search
 
(29 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ultibo Winsock2 Interface unit'''
 +
 
 +
''Notes:''
 +
* All BSD/Winsock functions that accept an Address or Port expect them to be in Network order.
 +
* All other functions that take an Address or Port expect them to be in Host order.
  
 
=== Constants ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Winsock2 specific constants''' <code> WINSOCK_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WINSOCK_VERSION = $0202;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WINSOCK_TCP_SERVER_THREAD_NAME = 'TCP Server';</code>
 +
| Thread name for TCP server threads
 +
|-
 +
| <code>WINSOCK_TCP_SERVER_THREAD_PRIORITY = THREAD_PRIORITY_NORMAL;</code>
 +
| Thread priority for TCP server threads
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WINSOCK_TCP_LISTENER_THREAD_NAME = 'TCP Listener';</code>
 +
| Thread name for TCP listener threads
 +
|-
 +
| <code>WINSOCK_TCP_LISTENER_THREAD_PRIORITY = THREAD_PRIORITY_NORMAL;</code>
 +
| Thread priority for TCP listener threads
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WINSOCK_UDP_SERVER_THREAD_NAME = 'UDP Server';</code>
 +
| Thread name for UDP server threads
 +
|-
 +
| <code>WINSOCK_UDP_SERVER_THREAD_PRIORITY = THREAD_PRIORITY_NORMAL;</code>
 +
| Thread priority for UDP server threads
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WINSOCK_UDP_LISTENER_THREAD_NAME = 'UDP Listener';</code>
 +
| Thread name for UDP listener threads
 +
|-
 +
| <code>WINSOCK_UDP_LISTENER_THREAD_PRIORITY = THREAD_PRIORITY_NORMAL;</code>
 +
| Thread priority for UDP listener threads
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>FD_SETSIZE = GlobalSock.FD_SETSIZE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IOCPARM_MASK = GlobalSock.IOCPARM_MASK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IOC_VOID = GlobalSock.IOC_VOID;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IOC_OUT = GlobalSock.IOC_OUT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IOC_IN = GlobalSock.IOC_IN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IOC_INOUT = GlobalSock.IOC_INOUT;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>FIONREAD = GlobalSock.FIONREAD; </code>
 +
| &nbsp;
 +
|-
 +
| <code>FIONBIO = GlobalSock.FIONBIO;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FIOASYNC = GlobalSock.FIOASYNC;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SIOCSHIWAT = GlobalSock.SIOCSHIWAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIOCGHIWAT = GlobalSock.SIOCGHIWAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIOCSLOWAT = GlobalSock.SIOCSLOWAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIOCGLOWAT = GlobalSock.SIOCGLOWAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIOCATMARK = GlobalSock.SIOCATMARK;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IMPLINK_IP = GlobalSock.IMPLINK_IP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IMPLINK_LOWEXPER = GlobalSock.IMPLINK_LOWEXPER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IMPLINK_HIGHEXPER = GlobalSock.IMPLINK_HIGHEXPER;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>TF_DISCONNECT = GlobalSock.TF_DISCONNECT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TF_REUSE_SOCKET = GlobalSock.TF_REUSE_SOCKET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TF_WRITE_BEHIND = GlobalSock.TF_WRITE_BEHIND;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>INET_ADDRSTR_ANY = GlobalSock.INET_ADDRSTR_ANY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>INET6_ADDRSTR_ANY = GlobalSock.INET6_ADDRSTR_ANY;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>INET_ADDRSTR_BROADCAST = GlobalSock.INET_ADDRSTR_BROADCAST;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>INET_ADDRSTRLEN = GlobalSock.INET_ADDRSTRLEN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>INET6_ADDRSTRLEN = GlobalSock.INET6_ADDRSTRLEN;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IN6ADDR_ANY_INIT:TIn6Addr = (u6_addr16: (0, 0, 0, 0, 0, 0, 0, 0));</code>
 +
| &nbsp;
 +
|-
 +
| <code>IN6ADDR_LOOPBACK_INIT:TIn6Addr = (u6_addr8: (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1));</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>INADDR_ANY = GlobalSock.INADDR_ANY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>INADDR_LOOPBACK = GlobalSock.INADDR_LOOPBACK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>INADDR_BROADCAST = GlobalSock.INADDR_BROADCAST;</code>
 +
| &nbsp;
 +
|-
 +
| <code>INADDR_NONE = GlobalSock.INADDR_NONE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IN6ADDR_ANY:TIn6Addr = (u6_addr16: (0, 0, 0, 0, 0, 0, 0, 0));</code>
 +
| &nbsp;
 +
|-
 +
| <code>IN6ADDR_LOOPBACK:TIn6Addr = (u6_addr8: (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1));</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IN6ADDR_NONE:TIn6Addr = (u6_addr16: ($ffff, $ffff, $ffff, $ffff, $ffff, $ffff, $ffff, $ffff));</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Level number for (get/set)sockopt() to apply to socket itself''
 +
|-
 +
| <code>SOL_SOCKET = GlobalSock.SOL_SOCKET;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Maximum queue length specifiable by listen''
 +
|-
 +
| <code>SOMAXCONN = GlobalSock.SOMAXCONN;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Return flags''
 +
|-
 +
| <code>RESULT_IS_ALIAS = $0001;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SERVICE_MULTIPLE = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>BIGENDIAN = $0000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LITTLEENDIAN = $0001;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SECURITY_PROTOCOL_NONE = $0000;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''This is used instead of -1, since the TSocket type is unsigned''
 +
|-
 +
| <code>INVALID_SOCKET = GlobalSock.INVALID_SOCKET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SOCKET_ERROR = GlobalSock.SOCKET_ERROR;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Define constant based on rfc883, used by gethostbyxxxx() calls''
 +
|-
 +
| <code>MAXGETHOSTSTRUCT = GlobalSock.MAXGETHOSTSTRUCT;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WSADESCRIPTION_LEN = GlobalSock.WSADESCRIPTION_LEN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSASYS_STATUS_LEN = GlobalSock.WSASYS_STATUS_LEN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MAX_PROTOCOL_CHAIN = 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BASE_PROTOCOL = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LAYERED_PROTOCOL = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAPROTOCOL_LEN = 255;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''IP protocol''' <code> IPPROTO_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>IPPROTO_IP = GlobalSock.IPPROTO_IP;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>IPPROTO_ICMP = GlobalSock.IPPROTO_ICMP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_IGMP = GlobalSock.IPPROTO_IGMP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_GGP = GlobalSock.IPPROTO_GGP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_TCP = GlobalSock.IPPROTO_TCP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_EGP = GlobalSock.IPPROTO_EGP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_PUP = GlobalSock.IPPROTO_PUP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_UDP = GlobalSock.IPPROTO_UDP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_HMP = GlobalSock.IPPROTO_HMP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_IDP = GlobalSock.IPPROTO_IDP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_RDP = GlobalSock.IPPROTO_RDP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_IPV6 = GlobalSock.IPPROTO_IPV6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_ROUTING = GlobalSock.IPPROTO_ROUTING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_FRAGMENT = GlobalSock.IPPROTO_FRAGMENT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_ICMPV6 = GlobalSock.IPPROTO_ICMPV6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_RVD = GlobalSock.IPPROTO_RVD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_ND = GlobalSock.IPPROTO_ND;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_RAW = GlobalSock.IPPROTO_RAW;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPROTO_MAX = GlobalSock.IPPROTO_MAX;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''IP port''' <code> IPPORT_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Port/socket numbers: network standard functions''
 +
|-
 +
| <code>IPPORT_ANY = GlobalSock.IPPORT_ANY;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>IPPORT_ECHO = GlobalSock.IPPORT_ECHO;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_DISCARD = GlobalSock.IPPORT_DISCARD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_SYSTAT = GlobalSock.IPPORT_SYSTAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_DAYTIME = GlobalSock.IPPORT_DAYTIME;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_NETSTAT = GlobalSock.IPPORT_NETSTAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_FTP = GlobalSock.IPPORT_FTP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_TELNET = GlobalSock.IPPORT_TELNET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_SMTP = GlobalSock.IPPORT_SMTP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_TIMESERVER = GlobalSock.IPPORT_TIMESERVER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_NAMESERVER = GlobalSock.IPPORT_NAMESERVER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_WHOIS = GlobalSock.IPPORT_WHOIS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_DNS = GlobalSock.IPPORT_DNS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_MTP = GlobalSock.IPPORT_MTP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_BOOTPS = GlobalSock.IPPORT_BOOTPS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_BOOTPC = GlobalSock.IPPORT_BOOTPC;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Port/socket numbers: host specific functions''
 +
|-
 +
| <code>IPPORT_TFTP = GlobalSock.IPPORT_TFTP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_RJE = GlobalSock.IPPORT_RJE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_FINGER = GlobalSock.IPPORT_FINGER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_TTYLINK = GlobalSock.IPPORT_TTYLINK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_SUPDUP = GlobalSock.IPPORT_SUPDUP;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''UNIX TCP sockets''
 +
|-
 +
| <code>IPPORT_EXECSERVER = GlobalSock.IPPORT_EXECSERVER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_LOGINSERVER = GlobalSock.IPPORT_LOGINSERVER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_CMDSERVER = GlobalSock.IPPORT_CMDSERVER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_EFSSERVER = GlobalSock.IPPORT_EFSSERVER;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''UNIX UDP sockets''
 +
|-
 +
| <code>IPPORT_BIFFUDP = GlobalSock.IPPORT_BIFFUDP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_WHOSERVER = GlobalSock.IPPORT_WHOSERVER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPPORT_ROUTESERVER = GlobalSock.IPPORT_ROUTESERVER;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root)''
 +
|-
 +
| <code>IPPORT_RESERVED = GlobalSock.IPPORT_RESERVED;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''IP option''' <code> IP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Options for use with [gs]etsockopt at the IP level
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IP_OPTIONS = GlobalSock.IP_OPTIONS;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>IP_MULTICAST_IF = GlobalSock.IP_MULTICAST_IF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_MULTICAST_TTL = GlobalSock.IP_MULTICAST_TTL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_MULTICAST_LOOP = GlobalSock.IP_MULTICAST_LOOP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_ADD_MEMBERSHIP = GlobalSock.IP_ADD_MEMBERSHIP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_DROP_MEMBERSHIP = GlobalSock.IP_DROP_MEMBERSHIP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_TTL = GlobalSock.IP_TTL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_TOS = GlobalSock.IP_TOS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_DONTFRAGMENT = GlobalSock.IP_DONTFRAGMENT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_HDRINCL = GlobalSock.IP_HDRINCL;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IP_DEFAULT_MULTICAST_TTL = GlobalSock.IP_DEFAULT_MULTICAST_TTL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_DEFAULT_MULTICAST_LOOP = GlobalSock.IP_DEFAULT_MULTICAST_LOOP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IP_MAX_MEMBERSHIPS = GlobalSock.IP_MAX_MEMBERSHIPS;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Socket type''' <code> SOCK_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SOCK_UNSPEC = GlobalSock.SOCK_UNSPEC;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>SOCK_STREAM = GlobalSock.SOCK_STREAM;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SOCK_DGRAM = GlobalSock.SOCK_DGRAM;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SOCK_RAW = GlobalSock.SOCK_RAW;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SOCK_RDM = GlobalSock.SOCK_RDM;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SOCK_SEQPACKET = GlobalSock.SOCK_SEQPACKET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SOCK_PACKET = GlobalSock.SOCK_PACKET;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Socket option''' <code> SO_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SO_DEBUG = GlobalSock.SO_DEBUG;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>SO_ACCEPTCONN = GlobalSock.SO_ACCEPTCONN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_REUSEADDR = GlobalSock.SO_REUSEADDR;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_KEEPALIVE = GlobalSock.SO_KEEPALIVE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_DONTROUTE = GlobalSock.SO_DONTROUTE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_BROADCAST = GlobalSock.SO_BROADCAST;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_USELOOPBACK = GlobalSock.SO_USELOOPBACK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_LINGER = GlobalSock.SO_LINGER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_OOBINLINE = GlobalSock.SO_OOBINLINE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SO_DONTLINGER = GlobalSock.SO_DONTLINGER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_EXCLUSIVEADDRUSE = GlobalSock.SO_EXCLUSIVEADDRUSE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Additional options''
 +
|-
 +
| <code>SO_SNDBUF = GlobalSock.SO_SNDBUF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_RCVBUF = GlobalSock.SO_RCVBUF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_SNDLOWAT = GlobalSock.SO_SNDLOWAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_RCVLOWAT = GlobalSock.SO_RCVLOWAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_SNDTIMEO = GlobalSock.SO_SNDTIMEO;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_RCVTIMEO = GlobalSock.SO_RCVTIMEO;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_ERROR = GlobalSock.SO_ERROR;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_TYPE = GlobalSock.SO_TYPE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_CONNTIMEO = GlobalSock.SO_CONNTIMEO;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Options for connect and disconnect data and options. Used only by non-TCP/IP transports such as DECNet, OSI TP4, etc''
 +
|-
 +
| <code>SO_CONNDATA = GlobalSock.SO_CONNDATA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_CONNOPT = GlobalSock.SO_CONNOPT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_DISCDATA = GlobalSock.SO_DISCDATA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_DISCOPT = GlobalSock.SO_DISCOPT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_CONNDATALEN = GlobalSock.SO_CONNDATALEN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_CONNOPTLEN = GlobalSock.SO_CONNOPTLEN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_DISCDATALEN = GlobalSock.SO_DISCDATALEN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_DISCOPTLEN = GlobalSock.SO_DISCOPTLEN;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Option for opening sockets for synchronous access''
 +
|-
 +
| <code>SO_OPENTYPE = GlobalSock.SO_OPENTYPE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_SYNCHRONOUS_ALERT = GlobalSock.SO_SYNCHRONOUS_ALERT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_SYNCHRONOUS_NONALERT = GlobalSock.SO_SYNCHRONOUS_NONALERT;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Other NT-specific options''
 +
|-
 +
| <code>SO_MAXDG = GlobalSock.SO_MAXDG;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_MAXPATHDG = GlobalSock.SO_MAXPATHDG;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_UPDATE_ACCEPT_CONTEXT = GlobalSock.SO_UPDATE_ACCEPT_CONTEXT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SO_CONNECT_TIME = GlobalSock.SO_CONNECT_TIME;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''TCP option''' <code> TCP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TCP_NODELAY= GlobalSock.TCP_NODELAY;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>TCP_MAXSEG = GlobalSock.TCP_MAXSEG;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TCP_NOPUSH = GlobalSock.TCP_NOPUSH;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TCP_NOOPT = GlobalSock.TCP_NOOPT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TCP_BSDURGENT = GlobalSock.TCP_BSDURGENT;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>TCP_WSCALE = GlobalSock.TCP_WSCALE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TCP_NOSACK = GlobalSock.TCP_NOSACK;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''UDP option''' <code> UDP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>UDP_NOCHECKSUM = GlobalSock.UDP_NOCHECKSUM;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Address family''' <code> AF_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>AF_UNSPEC = GlobalSock.AF_UNSPEC;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>AF_UNIX = GlobalSock.AF_UNIX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_INET = GlobalSock.AF_INET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_IMPLINK = GlobalSock.AF_IMPLINK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_PUP = GlobalSock.AF_PUP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_CHAOS = GlobalSock.AF_CHAOS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_IPX = GlobalSock.AF_IPX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_NS = GlobalSock.AF_NS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_ISO = GlobalSock.AF_ISO;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_OSI = GlobalSock.AF_OSI;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_ECMA = GlobalSock.AF_ECMA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_DATAKIT = GlobalSock.AF_DATAKIT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_CCITT = GlobalSock.AF_CCITT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_SNA = GlobalSock.AF_SNA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_DECnet = GlobalSock.AF_DECnet;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_DLI = GlobalSock.AF_DLI;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_LAT = GlobalSock.AF_LAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_HYLINK = GlobalSock.AF_HYLINK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_APPLETALK = GlobalSock.AF_APPLETALK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_NETBIOS = GlobalSock.AF_NETBIOS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_VOICEVIEW = GlobalSock.AF_VOICEVIEW;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_FIREFOX = GlobalSock.AF_FIREFOX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_UNKNOWN1 = GlobalSock.AF_UNKNOWN1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_BAN = GlobalSock.AF_BAN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_ATM = GlobalSock.AF_ATM;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_INET6 = GlobalSock.AF_INET6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_CLUSTER = GlobalSock.AF_CLUSTER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_12844 = GlobalSock.AF_12844;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_IRDA = GlobalSock.AF_IRDA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AF_NETDES = GlobalSock.AF_NETDES;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>AF_MAX = GlobalSock.AF_MAX;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Protocol family''' <code> PF_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PF_UNSPEC = GlobalSock.PF_UNSPEC;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>PF_UNIX = GlobalSock.PF_UNIX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_INET = GlobalSock.PF_INET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_IMPLINK = GlobalSock.PF_IMPLINK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_PUP = GlobalSock.PF_PUP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_CHAOS = GlobalSock.PF_CHAOS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_NS = GlobalSock.PF_NS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_IPX = GlobalSock.PF_IPX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_ISO = GlobalSock.PF_ISO;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_OSI = GlobalSock.PF_OSI;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_ECMA = GlobalSock.PF_ECMA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_DATAKIT = GlobalSock.PF_DATAKIT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_CCITT = GlobalSock.PF_CCITT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_SNA = GlobalSock.PF_SNA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_DECnet = GlobalSock.PF_DECnet;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_DLI = GlobalSock.PF_DLI;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_LAT = GlobalSock.PF_LAT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_HYLINK = GlobalSock.PF_HYLINK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_APPLETALK = GlobalSock.PF_APPLETALK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_VOICEVIEW = GlobalSock.PF_VOICEVIEW;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_FIREFOX = GlobalSock.PF_FIREFOX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_UNKNOWN1 = GlobalSock.PF_UNKNOWN1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_BAN = GlobalSock.PF_BAN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_ATM = GlobalSock.PF_ATM;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_INET6 = GlobalSock.PF_INET6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_CLUSTER = GlobalSock.PF_CLUSTER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_12844 = GlobalSock.PF_12844;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_IRDA = GlobalSock.PF_IRDA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PF_NETDES = GlobalSock.PF_NETDES;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PF_MAX = GlobalSock.PF_MAX;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Message flag''' <code> MSG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>MSG_OOB = GlobalSock.MSG_OOB;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>MSG_PEEK = GlobalSock.MSG_PEEK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MSG_DONTROUTE = GlobalSock.MSG_DONTROUTE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MSG_INTERRUPT = GlobalSock.MSG_INTERRUPT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MSG_MAXIOVLEN = GlobalSock.MSG_MAXIOVLEN;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MSG_PARTIAL = GlobalSock.MSG_PARTIAL;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''FD option''' <code> FD_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|WinSock 2 extension -- bit values and indices for FD_XXX network events
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>FD_READ_BIT = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>FD_READ = (1 shl FD_READ_BIT);</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_WRITE_BIT = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_WRITE = (1 shl FD_WRITE_BIT);</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_OOB_BIT = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_OOB = (1 shl FD_OOB_BIT);</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_ACCEPT_BIT = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_ACCEPT = (1 shl FD_ACCEPT_BIT);</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_CONNECT_BIT = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_CONNECT = (1 shl FD_CONNECT_BIT);</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_CLOSE_BIT = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_CLOSE = (1 shl FD_CLOSE_BIT);</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_QOS_BIT = 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_QOS = (1 shl FD_QOS_BIT);</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_GROUP_QOS_BIT = 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_GROUP_QOS = (1 shl FD_GROUP_QOS_BIT);</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_MAX_EVENTS = 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FD_ALL_EVENTS = ((1 shl FD_MAX_EVENTS) - 1);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Socket error''' <code> WSAE* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|All Windows Sockets error constants are biased by WSABASEERR from the "normal"
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WSABASEERR = GlobalSock.WSABASEERR;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Windows Sockets definitions of regular Microsoft C error constants''
 +
|-
 +
| <code>WSAEINTR = GlobalSock.WSAEINTR;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEBADF = GlobalSock.WSAEBADF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEACCES = GlobalSock.WSAEACCES;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEFAULT = GlobalSock.WSAEFAULT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEINVAL = GlobalSock.WSAEINVAL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEMFILE = GlobalSock.WSAEMFILE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Windows Sockets definitions of regular Berkeley error constants''
 +
|-
 +
| <code>WSAEWOULDBLOCK = GlobalSock.WSAEWOULDBLOCK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEINPROGRESS = GlobalSock.WSAEINPROGRESS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEALREADY = GlobalSock.WSAEALREADY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAENOTSOCK = GlobalSock.WSAENOTSOCK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEDESTADDRREQ = GlobalSock.WSAEDESTADDRREQ;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEMSGSIZE = GlobalSock.WSAEMSGSIZE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEPROTOTYPE = GlobalSock.WSAEPROTOTYPE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAENOPROTOOPT = GlobalSock.WSAENOPROTOOPT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEPROTONOSUPPORT = GlobalSock.WSAEPROTONOSUPPORT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAESOCKTNOSUPPORT = GlobalSock.WSAESOCKTNOSUPPORT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEOPNOTSUPP = GlobalSock.WSAEOPNOTSUPP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEPFNOSUPPORT = GlobalSock.WSAEPFNOSUPPORT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEAFNOSUPPORT = GlobalSock.WSAEAFNOSUPPORT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEADDRINUSE = GlobalSock.WSAEADDRINUSE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEADDRNOTAVAIL = GlobalSock.WSAEADDRNOTAVAIL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAENETDOWN = GlobalSock.WSAENETDOWN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAENETUNREACH = GlobalSock.WSAENETUNREACH;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAENETRESET = GlobalSock.WSAENETRESET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAECONNABORTED = GlobalSock.WSAECONNABORTED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAECONNRESET = GlobalSock.WSAECONNRESET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAENOBUFS = GlobalSock.WSAENOBUFS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEISCONN = GlobalSock.WSAEISCONN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAENOTCONN = GlobalSock.WSAENOTCONN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAESHUTDOWN = GlobalSock.WSAESHUTDOWN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAETOOMANYREFS = GlobalSock.WSAETOOMANYREFS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAETIMEDOUT = GlobalSock.WSAETIMEDOUT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAECONNREFUSED = GlobalSock.WSAECONNREFUSED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAELOOP = GlobalSock.WSAELOOP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAENAMETOOLONG = GlobalSock.WSAENAMETOOLONG;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEHOSTDOWN = GlobalSock.WSAEHOSTDOWN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEHOSTUNREACH = GlobalSock.WSAEHOSTUNREACH;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAENOTEMPTY = GlobalSock.WSAENOTEMPTY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEPROCLIM = GlobalSock.WSAEPROCLIM;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEUSERS = GlobalSock.WSAEUSERS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEDQUOT = GlobalSock.WSAEDQUOT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAESTALE = GlobalSock.WSAESTALE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEREMOTE = GlobalSock.WSAEREMOTE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WSAEDISCON = GlobalSock.WSAEDISCON;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Extended Windows Sockets error constant definitions''
 +
|-
 +
| <code>WSASYSNOTREADY = GlobalSock.WSASYSNOTREADY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAVERNOTSUPPORTED = GlobalSock.WSAVERNOTSUPPORTED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSANOTINITIALISED = GlobalSock.WSANOTINITIALISED;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WSAENOMORE = GlobalSock.WSAENOMORE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAECANCELLED = GlobalSock.WSAECANCELLED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEINVALIDPROCTABLE = GlobalSock.WSAEINVALIDPROCTABLE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEINVALIDPROVIDER = GlobalSock.WSAEINVALIDPROVIDER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEPROVIDERFAILEDINIT = GlobalSock.WSAEPROVIDERFAILEDINIT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSASYSCALLFAILURE = GlobalSock.WSASYSCALLFAILURE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSASERVICE_NOT_FOUND = GlobalSock.WSASERVICE_NOT_FOUND;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSATYPE_NOT_FOUND = GlobalSock.WSATYPE_NOT_FOUND;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_E_NO_MORE = GlobalSock.WSA_E_NO_MORE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_E_CANCELLED = GlobalSock.WSA_E_CANCELLED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSAEREFUSED = GlobalSock.WSAEREFUSED;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|Error return codes from gethostbyname() and gethostbyaddr() (when using the resolver). Note that these errors are retrieved via WSAGetLastError() and must therefore follow the rules for avoiding clashes with error numbers from specific implementations or language run-time systems. For this reason the codes are based at WSABASEERR+1001. Note also that [WSA]NO_ADDRESS is defined only for compatibility purposes.
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Authoritative Answer: Host not found''
 +
|-
 +
| <code>WSAHOST_NOT_FOUND = GlobalSock.WSAHOST_NOT_FOUND;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HOST_NOT_FOUND = GlobalSock.HOST_NOT_FOUND;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Non-Authoritative: Host not found, or SERVERFAIL''
 +
|-
 +
| <code>WSATRY_AGAIN = GlobalSock.WSATRY_AGAIN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TRY_AGAIN = GlobalSock.TRY_AGAIN;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Non recoverable errors, FORMERR, REFUSED, NOTIMP''
 +
|-
 +
| <code>WSANO_RECOVERY = GlobalSock.WSANO_RECOVERY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NO_RECOVERY = GlobalSock.NO_RECOVERY;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Valid name, no data record of requested type''
 +
|-
 +
| <code>WSANO_DATA = GlobalSock.WSANO_DATA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NO_DATA = GlobalSock.NO_DATA;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''no address, look for MX record''
 +
|-
 +
| <code>WSANO_ADDRESS = GlobalSock.WSANO_ADDRESS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NO_ADDRESS = GlobalSock.NO_ADDRESS;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''WinSock 2 extension -- new error codes and type definition''
 +
|-
 +
| <code>WSA_IO_PENDING = GlobalSock.WSA_IO_PENDING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_IO_INCOMPLETE = GlobalSock.WSA_IO_INCOMPLETE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_INVALID_HANDLE = GlobalSock.WSA_INVALID_HANDLE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_INVALID_PARAMETER = GlobalSock.WSA_INVALID_PARAMETER;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_NOT_ENOUGH_MEMORY = GlobalSock.WSA_NOT_ENOUGH_MEMORY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_OPERATION_ABORTED = GlobalSock.WSA_OPERATION_ABORTED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_INVALID_EVENT = GlobalSock.WSA_INVALID_EVENT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_MAXIMUM_WAIT_EVENTS = GlobalSock.WSA_MAXIMUM_WAIT_EVENTS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_WAIT_FAILED = GlobalSock.WSA_WAIT_FAILED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_WAIT_EVENT_0 = GlobalSock.WSA_WAIT_EVENT_0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_WAIT_IO_COMPLETION = GlobalSock.WSA_WAIT_IO_COMPLETION;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_WAIT_TIMEOUT = GlobalSock.WSA_WAIT_TIMEOUT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_INFINITE = GlobalSock.WSA_INFINITE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Windows Sockets errors redefined as regular Berkeley error constants. These are commented out in Windows NT to avoid conflicts with errno.h. Use the WSA constants instead.''
 +
|-
 +
| <code>EWOULDBLOCK = GlobalSock.EWOULDBLOCK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EINPROGRESS = GlobalSock.EINPROGRESS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EALREADY = GlobalSock.EALREADY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENOTSOCK = GlobalSock.ENOTSOCK;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EDESTADDRREQ = GlobalSock.EDESTADDRREQ;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EMSGSIZE = GlobalSock.EMSGSIZE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EPROTOTYPE = GlobalSock.EPROTOTYPE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENOPROTOOPT = GlobalSock.ENOPROTOOPT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EPROTONOSUPPORT = GlobalSock.EPROTONOSUPPORT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ESOCKTNOSUPPORT = GlobalSock.ESOCKTNOSUPPORT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EOPNOTSUPP = GlobalSock.EOPNOTSUPP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EPFNOSUPPORT = GlobalSock.EPFNOSUPPORT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EAFNOSUPPORT = GlobalSock.EAFNOSUPPORT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EADDRINUSE = GlobalSock.EADDRINUSE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EADDRNOTAVAIL = GlobalSock.EADDRNOTAVAIL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENETDOWN = GlobalSock.ENETDOWN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENETUNREACH = GlobalSock.ENETUNREACH;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENETRESET = GlobalSock.ENETRESET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ECONNABORTED = GlobalSock.ECONNABORTED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ECONNRESET = GlobalSock.ECONNRESET;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENOBUFS = GlobalSock.ENOBUFS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EISCONN = GlobalSock.EISCONN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENOTCONN = GlobalSock.ENOTCONN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ESHUTDOWN = GlobalSock.ESHUTDOWN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ETOOMANYREFS = GlobalSock.ETOOMANYREFS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ETIMEDOUT = GlobalSock.ETIMEDOUT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ECONNREFUSED = GlobalSock.ECONNREFUSED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ELOOP = GlobalSock.ELOOP;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENAMETOOLONG = GlobalSock.ENAMETOOLONG;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EHOSTDOWN = GlobalSock.EHOSTDOWN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EHOSTUNREACH = GlobalSock.EHOSTUNREACH;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENOTEMPTY = GlobalSock.ENOTEMPTY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EPROCLIM = GlobalSock.EPROCLIM;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EUSERS = GlobalSock.EUSERS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EDQUOT = GlobalSock.EDQUOT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ESTALE = GlobalSock.ESTALE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EREMOTE = GlobalSock.EREMOTE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>ENOTREADY = GlobalSock.ENOTREADY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EVERNOTSUPPORTED = GlobalSock.EVERNOTSUPPORTED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ENOTINITIALISED = GlobalSock.ENOTINITIALISED;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Error codes from getaddrinfo()''
 +
|-
 +
| <code>EAI_AGAIN = GlobalSock.EAI_AGAIN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EAI_BADFLAGS = GlobalSock.EAI_BADFLAGS;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EAI_FAIL = GlobalSock.EAI_FAIL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EAI_FAMILY = GlobalSock.EAI_FAMILY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EAI_MEMORY = GlobalSock.EAI_MEMORY;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EAI_NODATA = GlobalSock.EAI_NODATA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EAI_NONAME = GlobalSock.EAI_NONAME;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EAI_SERVICE = GlobalSock.EAI_SERVICE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EAI_SOCKTYPE = GlobalSock.EAI_SOCKTYPE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>EAI_NODATA = GlobalSock.EAI_NODATA;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Condition function value''' <code> CF_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|WinSock 2 extension -- manifest constants for return values of the condition function
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CF_ACCEPT = $0000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>CF_REJECT = $0001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CF_DEFER = $0002;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Shutdown option''' <code> SD_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|WinSock 2 extension -- manifest constants for shutdown()
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SD_RECEIVE = GlobalSock.SD_RECEIVE;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>SD_SEND = GlobalSock.SD_SEND;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SD_BOTH = GlobalSock.SD_BOTH;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Socket group''' <code> SG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|WinSock 2 extension -- data type and manifest constants for socket groups
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SG_UNCONSTRAINED_GROUP = $01;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>SG_CONSTRAINED_GROUP = $02;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Provider flag''' <code> PFL_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Flag bit definitions for dwProviderFlags */
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PFL_MULTIPLE_PROTO_ENTRIES = $00000001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>PFL_RECOMMENDED_PROTO_ENTRY = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PFL_HIDDEN = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PFL_MATCHES_PROTOCOL_ZERO = $00000008;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Service flag''' <code> XP1_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|&nbsp;Flag bit definitions for dwServiceFlags1 */
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>XP1_CONNECTIONLESS = $00000001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>XP1_GUARANTEED_DELIVERY = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_GUARANTEED_ORDER = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_MESSAGE_ORIENTED = $00000008;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_PSEUDO_STREAM = $00000010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_GRACEFUL_CLOSE = $00000020;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_EXPEDITED_DATA = $00000040;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_CONNECT_DATA = $00000080;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_DISCONNECT_DATA = $00000100;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_SUPPORT_BROADCAST = $00000200;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_SUPPORT_MULTIPOINT = $00000400;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_MULTIPOINT_CONTROL_PLANE = $00000800;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_MULTIPOINT_DATA_PLANE = $00001000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_QOS_SUPPORTED = $00002000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_INTERRUPT = $00004000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_UNI_SEND = $00008000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_UNI_RECV = $00010000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_IFS_HANDLES = $00020000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>XP1_PARTIAL_MESSAGE = $00040000;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Join leaf option''' <code> JL_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|WinSock 2 extension -- manifest constants for WSAJoinLeaf()
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>JL_SENDER_ONLY = $01;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>JL_RECEIVER_ONLY = $02;</code>
 +
| &nbsp;
 +
|-
 +
| <code>JL_BOTH = $04;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Socket flag''' <code> WSA_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|WinSock 2 extension -- manifest constants for WSASocket()
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WSA_FLAG_OVERLAPPED = $01;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>WSA_FLAG_MULTIPOINT_C_ROOT = $02;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_FLAG_MULTIPOINT_C_LEAF = $04;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_FLAG_MULTIPOINT_D_ROOT = $08;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WSA_FLAG_MULTIPOINT_D_LEAF = $10;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Socket IOC option''' <code> IOC_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|WinSock 2 extension -- manifest constants for WSAIoctl()
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IOC_UNIX = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>IOC_WS2 = $08000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IOC_PROTOCOL = $10000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IOC_VENDOR = $18000000;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''SIO option''' <code> SIO_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SIO_ASSOCIATE_HANDLE = IOC_IN or IOC_WS2 or 1;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>SIO_ENABLE_CIRCULAR_QUEUEING = IOC_WS2 or 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_FIND_ROUTE = IOC_OUT or IOC_WS2 or 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_FLUSH = IOC_WS2 or 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_GET_BROADCAST_ADDRESS = IOC_OUT or IOC_WS2 or 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT or IOC_WS2 or 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_GET_QOS = IOC_INOUT or IOC_WS2 or 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_GET_GROUP_QOS = IOC_INOUT or IOC_WS2 or 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_MULTIPOINT_LOOPBACK = IOC_IN or IOC_WS2 or 9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_MULTICAST_SCOPE = IOC_IN or IOC_WS2 or 10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_SET_QOS = IOC_IN or IOC_WS2 or 11;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_SET_GROUP_QOS = IOC_IN or IOC_WS2 or 12;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SIO_TRANSLATE_HANDLE = IOC_INOUT or IOC_WS2 or 13;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''WinSock 2 extension -- manifest constants for SIO_TRANSLATE_HANDLE ioctl''
 +
|-
 +
| <code>TH_NETDEV = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TH_TAPI = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Name space''' <code> NS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NS_ALL = (0);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NS_SAP = (1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_NDS = (2);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_PEER_BROWSE = (3);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NS_TCPIP_LOCAL = (10);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_TCPIP_HOSTS = (11);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_DNS = (12);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_NETBT = (13);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_WINS = (14);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NS_NBP = (20);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code> NS_MS = (30);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_STDA = (31);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_NTDS = (32);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NS_X500 = (40);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_NIS = (41);</code>
 +
| &nbsp;
 +
|-
 +
| <code>NS_NISPLUS = (42);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NS_WRQ = (50);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Resolution flag''' <code> RES_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Resolution flags for WSAGetAddressByName() Note these are also used by the 1.1 API GetAddressByName, so leave them around.
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RES_UNUSED_1 = $00000001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RES_FLUSH_CACHE = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RES_SERVICE = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Service type value''' <code> SERVICE_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Well known value names for Service Types
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SERVICE_TYPE_VALUE_IPXPORTA = 'IpxSocket';</code>
 +
| SERVICE_TYPE_VALUE_IPXPORTW : PWideChar = 'IpxSocket';
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SERVICE_TYPE_VALUE_SAPIDA = 'SapId';</code>
 +
| SERVICE_TYPE_VALUE_SAPIDW : PWideChar = 'SapId';
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SERVICE_TYPE_VALUE_TCPPORTA = 'TcpPort';</code>
 +
| SERVICE_TYPE_VALUE_TCPPORTW : PWideChar = 'TcpPort';
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SERVICE_TYPE_VALUE_UDPPORTA = 'UdpPort';</code>
 +
| SERVICE_TYPE_VALUE_UDPPORTW : PWideChar = 'UdpPort';
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SERVICE_TYPE_VALUE_OBJECTIDA = 'ObjectId';</code>
 +
| SERVICE_TYPE_VALUE_OBJECTIDW : PWideChar = 'ObjectId';
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SERVICE_TYPE_VALUE_OBJECTID = SERVICE_TYPE_VALUE_OBJECTIDA;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''WinSock 2 extension -- WSABUF and QOS struct, include qos.h to pull in FLOWSPEC and related definitions''
 +
|-
 +
| <code>SERVICETYPE_NOTRAFFIC = $00000000;</code>
 +
| No data in this direction
 +
|-
 +
| <code>SERVICETYPE_BESTEFFORT = $00000001;</code>
 +
| Best Effort
 +
|-
 +
| <code>SERVICETYPE_CONTROLLEDLOAD = $00000002;</code>
 +
| Controlled Load
 +
|-
 +
| <code>SERVICETYPE_GUARANTEED = $00000003;</code>
 +
| Guaranteed
 +
|-
 +
| <code>SERVICETYPE_NETWORK_UNAVAILABLE = $00000004;</code>
 +
| Used to notify change to user
 +
|-
 +
| <code>SERVICETYPE_GENERAL_INFORMATION = $00000005;</code>
 +
| Corresponds to "General Parameters" defined by IntServ
 +
|-
 +
| <code>SERVICETYPE_NOCHANGE = $00000006;</code>
 +
| Used to indicate that the flow spec contains no change from any previous one
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SERVICE_IMMEDIATE_TRAFFIC_CONTROL = $80000000;</code>
 +
| To turn on immediate traffic control, OR this flag with the ServiceType field in teh FLOWSPEC
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''LUP option''' <code> LUP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>LUP_DEEP = $0001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>LUP_CONTAINERS = $0002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_NOCONTAINERS = $0004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_NEAREST = $0008;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RETURN_NAME = $0010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RETURN_TYPE = $0020;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RETURN_VERSION = $0040;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RETURN_COMMENT = $0080;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RETURN_ADDR = $0100;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RETURN_BLOB = $0200;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RETURN_ALIASES = $0400;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RETURN_QUERY_STRING = $0800;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RETURN_ALL = $0FF0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_RES_SERVICE = $8000;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>LUP_FLUSHCACHE = $1000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LUP_FLUSHPREVIOUS = $2000;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Address info flag''' <code> AI_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Flags used in "hints" argument to getaddrinfo()
 +
|-
 +
|colspan="2"|Note: Under Linux these values may be different
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>AI_PASSIVE = GlobalSock.AI_PASSIVE;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>AI_CANONNAME = GlobalSock.AI_CANONNAME;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_NUMERICHOST = GlobalSock.AI_NUMERICHOST;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_NUMERICSERV = GlobalSock.AI_NUMERICSERV;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_ALL = GlobalSock.AI_ALL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_ADDRCONFIG = GlobalSock.AI_ADDRCONFIG;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_V4MAPPED = GlobalSock.AI_V4MAPPED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_NON_AUTHORITATIVE = GlobalSock.AI_NON_AUTHORITATIVE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_SECURE = GlobalSock.AI_SECURE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_RETURN_PREFERRED_NAMES = GlobalSock.AI_RETURN_PREFERRED_NAMES;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_FQDN = GlobalSock.AI_FQDN;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AI_FILESERVER = GlobalSock.AI_FILESERVER;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Name info flag''' <code> NI_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Flags for getnameinfo()
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NI_NOFQDN = GlobalSock.NI_NOFQDN;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>NI_NUMERICHOST = GlobalSock.NI_NUMERICHOST;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NI_NAMEREQD = GlobalSock.NI_NAMEREQD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NI_NUMERICSERV = GlobalSock.NI_NUMERICSERV;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NI_DGRAM = GlobalSock.NI_DGRAM;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NI_MAXHOST = GlobalSock.NI_MAXHOST;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NI_MAXSERV = GlobalSock.NI_MAXSERV;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
See globalsock.pas
 +
 
 +
=== Class definitions ===
 +
----
 +
 
 +
 
 +
'''Base socket classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2Socket|<code>TWinsock2Socket = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2SocketThread|<code>TWinsock2SocketThread = class(TThreadEx)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2SocketThreads|<code>TWinsock2SocketThreads = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2SocketBuffer|<code>TWinsock2SocketBuffer = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2SocketBuffers|<code>TWinsock2SocketBuffers = class(TObject)</code>]]
 +
|-
 +
|}
 +
 
 +
'''Raw socket (SOCK_RAW) classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2RAWSocket|<code>TWinsock2RAWSocket = class(TWinsock2Socket)</code>]]
 +
|-
 +
|}
 +
 
 +
'''Stream socket (SOCK_STREAM) classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2TCPSocket|<code>TWinsock2TCPSocket = class(TWinsock2Socket)</code>]]
 +
|-
 +
|}
 +
 
 +
'''Datagram socket (SOCK_DGRAM) classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2UDPSocket|<code>TWinsock2UDPSocket = class(TWinsock2Socket)</code>]]
 +
|-
 +
|}
 +
 
 +
'''Raw client classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2RAWClient|<code>TWinsock2RAWClient = class(TWinsock2RAWSocket)</code>]]
 +
|-
 +
|}
 +
 
 +
'''Stream client classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2TCPClient|<code>TWinsock2TCPClient = class(TWinsock2TCPSocket)</code>]]
 +
|-
 +
|}
 +
 
 +
'''Datagram client classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2UDPClient|<code>TWinsock2UDPClient = class(TWinsock2UDPSocket)</code>]]
 +
|-
 +
|}
 +
 
 +
'''Stream server classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2TCPServer|<code>TWinsock2TCPServer = class(TWinsock2TCPSocket)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2TCPServerThread|<code>TWinsock2TCPServerThread = class(TWinsock2SocketThread)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2TCPListenerThread|<code>TWinsock2TCPListenerThread = class(TWinsock2SocketThread)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2TCPServerThreads|<code>TWinsock2TCPServerThreads = class(TWinsock2SocketThreads)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2TCPListener|<code>TWinsock2TCPListener = class(TWinsock2TCPSocket)</code>]]
 +
|-
 +
|}
 +
 
 +
'''Datagram server classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2UDPServer|<code>TWinsock2UDPServer = class(TWinsock2UDPSocket)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2UDPServerThread|<code>TWinsock2UDPServerThread = class(TWinsock2SocketThread)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2UDPListenerThread|<code>TWinsock2UDPListenerThread = class(TWinsock2SocketThread)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2UDPServerThreads|<code>TWinsock2UDPServerThreads = class(TWinsock2SocketThreads)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2UDPServerBuffer|<code>TWinsock2UDPServerBuffer = class(TWinsock2SocketBuffer)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2UDPServerBuffers|<code>TWinsock2UDPServerBuffers = class(TWinsock2SocketBuffers)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TWinsock2UDPListener|<code>TWinsock2UDPListener = class(TWinsock2UDPSocket)</code>]]
 +
|-
 +
|}
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
''None defined''
  
 
=== Function declarations ===
 
=== Function declarations ===
Line 34: Line 2,224:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 46: Line 2,236:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 58: Line 2,248:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 70: Line 2,260:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 85: Line 2,275:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 97: Line 2,287:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 109: Line 2,299:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 121: Line 2,311:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 133: Line 2,323:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 145: Line 2,335:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 157: Line 2,347:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 169: Line 2,359:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 181: Line 2,371:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 193: Line 2,383:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 205: Line 2,395:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 217: Line 2,407:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 229: Line 2,419:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 241: Line 2,431:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 253: Line 2,443:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 265: Line 2,455:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 277: Line 2,467:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| Address will be returned in network order
 
|-
 
|-
 
|}
 
|}
Line 289: Line 2,479:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| As per the Winsock specification, the buffer returned by this function is only guaranteed to be valid until the next Winsock function call is made within the same thread. Therefore, the data should be copied before another Winsock call.
 
| As per the Winsock specification, the buffer returned by this function is only guaranteed to be valid until the next Winsock function call is made within the same thread. Therefore, the data should be copied before another Winsock call.
 +
Address will be in network order
 
|-
 
|-
 
|}
 
|}
Line 301: Line 2,492:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 313: Line 2,504:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 325: Line 2,516:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 337: Line 2,528:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 349: Line 2,540:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 361: Line 2,552:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 373: Line 2,564:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 385: Line 2,576:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 397: Line 2,588:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 409: Line 2,600:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| All sockets contained in the FSSet must by of the same type
+
| All sockets contained by the FDSet must be of the same type
 
|-
 
|-
 
|}
 
|}
Line 421: Line 2,612:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 433: Line 2,624:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 445: Line 2,636:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 457: Line 2,648:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 469: Line 2,660:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 481: Line 2,672:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 493: Line 2,684:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 505: Line 2,696:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 517: Line 2,708:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 529: Line 2,720:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 541: Line 2,732:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 553: Line 2,744:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| Address will be in network order where applicable
 
|-
 
|-
 
|}
 
|}
Line 565: Line 2,756:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 577: Line 2,768:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 589: Line 2,780:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| Port will be in network order
 
|-
 
|-
 
|}
 
|}
Line 601: Line 2,792:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 613: Line 2,804:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 625: Line 2,816:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 633: Line 2,824:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function getaddrinfo(pNodeName, pServiceName: PChar; pHints: PAddrInfo; var ppResult: PAddrInfo): LongInt;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function getaddrinfo(pNodeName, pServiceName: PChar; pHints: PAddrInfo; var ppResult: PAddrInfo): LongInt;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' RFC 3493 protocol-independent translation from a host name to an address</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 645: Line 2,836:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">procedure freeaddrinfo(ai: PAddrInfo);</pre>
 
<pre style="border: 0; padding-bottom:0px;">procedure freeaddrinfo(ai: PAddrInfo);</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Free address information that GetAddrInfo dynamically allocates in TAddrInfo structures</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 657: Line 2,848:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function getnameinfo(sa: PSockAddr; salen: Integer; host: PChar; hostlen: DWORD; serv: PChar; servlen: DWORD; flags: Integer): Integer;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function getnameinfo(sa: PSockAddr; salen: Integer; host: PChar; hostlen: DWORD; serv: PChar; servlen: DWORD; flags: Integer): Integer;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' RFC 3493 protocol-independent name resolution from an address to a host name and a port number to a service name</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function Gai_StrError(ecode: Longint): PChar;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return an error message for an error code returned by GetAddrInfo or GetNameInfo</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 673: Line 2,876:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 685: Line 2,888:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 692: Line 2,895:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">procedure WSASetLastError(iError: Longint);</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure WSASetLastError(iError: Longint); inline;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 704: Line 2,907:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function WSAGetLastError: Longint;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function WSAGetLastError: Longint; inline;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 721: Line 2,924:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 733: Line 2,936:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| Address will be returned in network order where applicable
 
|-
 
|-
 
|}
 
|}
Line 745: Line 2,948:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| Address will be returned in network order where applicable
 
|-
 
|-
 
|}
 
|}
Line 757: Line 2,960:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| Address will be returned in network order where applicable
 
|-
 
|-
 
|}
 
|}
Line 769: Line 2,972:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| Address will be in network order where applicable
 
|-
 
|-
 
|}
 
|}
Line 781: Line 2,984:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| Address will be in network order where applicable
 
|-
 
|-
 
|}
 
|}
Line 793: Line 2,996:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| Address will be in network order where applicable
 
|-
 
|-
 
|}
 
|}
Line 805: Line 3,008:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 817: Line 3,020:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WSANtohl( s : TSocket; netlong : u_long; var lphostlong : DWORD ): Longint;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WSANtohs( s : TSocket; netshort : u_short; var lphostshort : WORD ): Longint;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WSAMakeSyncReply(Buflen, Error: Word): Longint;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WSAMakeSelectReply(Event, Error: Word): Longint;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WSAGetAsyncBuflen(Param: Longint): Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WSAGetAsyncError(Param: Longint): Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WSAGetSelectEvent(Param: Longint): Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WSAGetSelectError(Param: Longint): Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure FD_CLR(Socket: TSocket; var FDSet: TFDSet);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FD_ISSET(Socket: TSocket; var FDSet: TFDSet): Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure FD_SET(Socket: TSocket; var FDSet: TFDSet);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure FD_ZERO(var FDSet: TFDSet);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
'''Winsock2 undocumented functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WsControl(Proto:DWORD; Action:DWORD; pRequestInfo:Pointer; var pcbRequestInfoLen:DWORD; pResponseInfo:Pointer; var pcbResponseInfoLen:DWORD):Integer;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function getnetbyaddr(addr: Pointer; len, Struct: Integer): PNetEnt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Address will be in network order where applicable
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function getnetbyname(name: PChar): PNetEnt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
'''Winsock2 enhanced functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function WsControlEx(Proto:DWORD; Action:DWORD; pRequestInfo:Pointer; var pcbRequestInfoLen:DWORD; pResponseInfo:Pointer; var pcbResponseInfoLen:DWORD):Integer;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
'''RTL text IO functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SysTextIOReadChar(var ACh:Char; AUserData:Pointer):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handler for platform TextIOReadChar function</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SysTextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handler for platform TextIOWriteChar function</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SysTextIOWriteBuffer(ABuffer:PChar; ACount:LongInt; AUserData:Pointer):LongInt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handler for platform TextIOWriteBuffer function</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
'''Winsock2 helper functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function Winsock2RedirectInput(s:TSocket):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Redirect standard input to the socket specified by s</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! s
 +
| The socket to redirect input to (or INVALID_SOCKET to stop redirection)
 +
|-
 +
! Return
 +
| True if completed successfully or False if an error occurred
 +
|-
 +
! Note
 +
| Redirects the input of the text file Input which also redirects the input of Read, ReadLn and the standard C library.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function Winsock2RedirectOutput(s:TSocket):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Redirect standard output to the socket specified by s</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! s
 +
| The socket to redirect output to (or INVALID_SOCKET to stop redirection)
 +
|-
 +
! Return
 +
| True if completed successfully or False if an error occurred
 +
|-
 +
! Note
 +
| Redirects the output of the text files Output, ErrOutput, StdOut and StdErr which also redirects the output of Write, WriteLn and the standard C library.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function Winsock2ErrorToString(AError:LongInt):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 
|-
 
|-
 
|}
 
|}

Latest revision as of 02:50, 6 March 2025

Return to Unit Reference


Description


Ultibo Winsock2 Interface unit

Notes:

  • All BSD/Winsock functions that accept an Address or Port expect them to be in Network order.
  • All other functions that take an Address or Port expect them to be in Host order.

Constants



[Expand]
Winsock2 specific constants WINSOCK_*


[Expand]
IP protocol IPPROTO_*


[Expand]
IP port IPPORT_*


[Expand]
IP option IP_*


[Expand]
Socket type SOCK_*


[Expand]
Socket option SO_*


[Expand]
TCP option TCP_*


[Expand]
UDP option UDP_*


[Expand]
Address family AF_*


[Expand]
Protocol family PF_*


[Expand]
Message flag MSG_*


[Expand]
FD option FD_*


[Expand]
Socket error WSAE*


[Expand]
Condition function value CF_*


[Expand]
Shutdown option SD_*


[Expand]
Socket group SG_*


[Expand]
Provider flag PFL_*


[Expand]
Service flag XP1_*


[Expand]
Join leaf option JL_*


[Expand]
Socket flag WSA_FLAG_*


[Expand]
Socket IOC option IOC_*


[Expand]
SIO option SIO_*


[Expand]
Name space NS_*


[Expand]
Resolution flag RES_*


[Expand]
Service type value SERVICE_TYPE_*


[Expand]
LUP option LUP_*


[Expand]
Address info flag AI_*


[Expand]
Name info flag NI_*


Type definitions


See globalsock.pas

Class definitions



Base socket classes

TWinsock2Socket = class(TListObject)
TWinsock2SocketThread = class(TThreadEx)
TWinsock2SocketThreads = class(TObject)
TWinsock2SocketBuffer = class(TObject)
TWinsock2SocketBuffers = class(TObject)

Raw socket (SOCK_RAW) classes

TWinsock2RAWSocket = class(TWinsock2Socket)

Stream socket (SOCK_STREAM) classes

TWinsock2TCPSocket = class(TWinsock2Socket)

Datagram socket (SOCK_DGRAM) classes

TWinsock2UDPSocket = class(TWinsock2Socket)

Raw client classes

TWinsock2RAWClient = class(TWinsock2RAWSocket)

Stream client classes

TWinsock2TCPClient = class(TWinsock2TCPSocket)

Datagram client classes

TWinsock2UDPClient = class(TWinsock2UDPSocket)

Stream server classes

TWinsock2TCPServer = class(TWinsock2TCPSocket)
TWinsock2TCPServerThread = class(TWinsock2SocketThread)
TWinsock2TCPListenerThread = class(TWinsock2SocketThread)
TWinsock2TCPServerThreads = class(TWinsock2SocketThreads)
TWinsock2TCPListener = class(TWinsock2TCPSocket)

Datagram server classes

TWinsock2UDPServer = class(TWinsock2UDPSocket)
TWinsock2UDPServerThread = class(TWinsock2SocketThread)
TWinsock2UDPListenerThread = class(TWinsock2SocketThread)
TWinsock2UDPServerThreads = class(TWinsock2SocketThreads)
TWinsock2UDPServerBuffer = class(TWinsock2SocketBuffer)
TWinsock2UDPServerBuffers = class(TWinsock2SocketBuffers)
TWinsock2UDPListener = class(TWinsock2UDPSocket)


Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure WS2Init;
Description: To be documented


[Expand]
function WS2Start:Boolean;
Description: To be documented


[Expand]
function WS2Stop:Boolean;
Description: To be documented


[Expand]
procedure WS2AsyncStart(Data:Pointer);
Description: To be documented


Winsock2 functions

[Expand]
function accept( const s: TSocket; addr: PSockAddr; addrlen: PLongint ): TSocket;
Description: To be documented


[Expand]
function accept( const s: TSocket; addr: PSockAddr; var addrlen: Longint ): TSocket;
Description: To be documented


[Expand]
function bind( const s: TSocket; addr: PSockAddr; namelen: Longint ): Longint;
Description: To be documented


[Expand]
function bind( const s: TSocket; var addr: TSockAddr; namelen: Longint ): Longint;
Description: To be documented


[Expand]
function closesocket( const s: TSocket ): Longint;
Description: To be documented


[Expand]
function connect( const s: TSocket; name: PSockAddr; namelen: Longint): Longint;
Description: To be documented


[Expand]
function connect( const s: TSocket; var name: TSockAddr; namelen: Longint): Longint;
Description: To be documented


[Expand]
function ioctlsocket( const s: TSocket; cmd: Longint; var arg: u_long ): Longint;
Description: To be documented


[Expand]
function ioctlsocket( const s: TSocket; cmd: Longint; argp: pu_long ): Longint;
Description: To be documented


[Expand]
function getpeername( const s: TSocket; var name: TSockAddr; var namelen: Longint ): Longint;
Description: To be documented


[Expand]
function getsockname( const s: TSocket; var name: TSockAddr; var namelen: Longint ): Longint;
Description: To be documented


[Expand]
function getsockopt( const s: TSocket; const level, optname: Longint; optval: PChar; var optlen: Longint ): Longint;
Description: To be documented


[Expand]
function getsockopt( const s: TSocket; const level, optname: Longint; optval: Pointer; var optlen: Longint ): Longint;
Description: To be documented


[Expand]
function getsockopt( const s: TSocket; const level, optname: Longint; var optval; var optlen: Longint ): Longint;
Description: To be documented


[Expand]
function htonl(hostlong: u_long): u_long;
Description: To be documented


[Expand]
function htons(hostshort: u_short): u_short;
Description: To be documented


[Expand]
function inet_addr(cp: PChar): u_long;
Description: To be documented


[Expand]
function inet_ntoa(inaddr: TInAddr): PChar;
Description: To be documented


[Expand]
function listen(s: TSocket; backlog: Longint): Longint;
Description: To be documented


[Expand]
function ntohl(netlong: u_long): u_long;
Description: To be documented


[Expand]
function ntohs(netshort: u_short): u_short;
Description: To be documented


[Expand]
function recv(s: TSocket; var Buf; len, flags: Longint): Longint;
Description: To be documented


[Expand]
function recv(s: TSocket; Buf: PChar; len, flags: Longint): Longint;
Description: To be documented


[Expand]
function recv(s: TSocket; Buf: Pointer; len, flags: Longint): Longint;
Description: To be documented


[Expand]
function recvfrom(s: TSocket; Buf: PChar; len, flags: Longint; from: PSockAddr; fromlen: PLongint): Longint;
Description: To be documented


[Expand]
function recvfrom(s: TSocket; Buf: Pointer; len, flags: Longint; from: PSockAddr; fromlen: PLongint): Longint;
Description: To be documented


[Expand]
function recvfrom(s: TSocket; var Buf; len, flags: Longint; var from: TSockAddr; var fromlen: Longint): Longint;
Description: To be documented


[Expand]
function select(nfds: Longint; readfds, writefds, exceptfds: PFDSet; timeout: PTimeVal): Longint;
Description: To be documented


[Expand]
function send(s: TSocket; var Buf; len, flags: Longint): Longint;
Description: To be documented


[Expand]
function send(s: TSocket; Buf: PChar; len, flags: Longint): Longint;
Description: To be documented


[Expand]
function send(s: TSocket; Buf: Pointer; len, flags: Longint): Longint;
Description: To be documented


[Expand]
function sendto(s: TSocket; var Buf; len, flags: Longint; var addrto: TSockAddr; tolen: Longint): Longint;
Description: To be documented


[Expand]
function sendto(s: TSocket; Buf: PChar; len, flags: Longint; addrto: PSockAddr; tolen: Longint): Longint;
Description: To be documented


[Expand]
function sendto(s: TSocket; Buf: Pointer; len, flags: Longint; addrto: PSockAddr; tolen: Longint): Longint;
Description: To be documented


[Expand]
function setsockopt(s: TSocket; level, optname: Longint; const optval; optlen: Longint): Longint;
Description: To be documented


[Expand]
function setsockopt(s: TSocket; level, optname: Longint; optval: PChar; optlen: Longint): Longint;
Description: To be documented


[Expand]
function setsockopt(s: TSocket; level, optname: Longint; optval: Pointer; optlen: Longint): Longint;
Description: To be documented


[Expand]
function shutdown(s: TSocket; how: Longint): Longint;
Description: To be documented


[Expand]
function socket(af, struct, protocol: Longint): TSocket;
Description: To be documented


[Expand]
function gethostbyaddr(addr: Pointer; len, family: Longint): PHostEnt;
Description: To be documented


[Expand]
function gethostbyname(name: PChar): PHostEnt;
Description: To be documented


[Expand]
function gethostname(name: PChar; len: Longint): Longint;
Description: To be documented


[Expand]
function getservbyport(port: Longint; proto: PChar): PServEnt;
Description: To be documented


[Expand]
function getservbyname(name, proto: PChar): PServEnt;
Description: To be documented


[Expand]
function getprotobynumber(proto: Longint): PProtoEnt;
Description: To be documented


[Expand]
function getprotobyname(name: PChar): PProtoEnt;
Description: To be documented


[Expand]
function getaddrinfo(pNodeName, pServiceName: PChar; pHints: PAddrInfo; var ppResult: PAddrInfo): LongInt;
Description: RFC 3493 protocol-independent translation from a host name to an address


[Expand]
procedure freeaddrinfo(ai: PAddrInfo);
Description: Free address information that GetAddrInfo dynamically allocates in TAddrInfo structures


[Expand]
function getnameinfo(sa: PSockAddr; salen: Integer; host: PChar; hostlen: DWORD; serv: PChar; servlen: DWORD; flags: Integer): Integer;
Description: RFC 3493 protocol-independent name resolution from an address to a host name and a port number to a service name


[Expand]
function Gai_StrError(ecode: Longint): PChar;
Description: Return an error message for an error code returned by GetAddrInfo or GetNameInfo


[Expand]
function WSAStartup(wVersionRequired: word; var WSData: TWSAData): Longint;
Description: To be documented


[Expand]
function WSACleanup: Longint;
Description: To be documented


[Expand]
procedure WSASetLastError(iError: Longint); inline;
Description: To be documented


[Expand]
function WSAGetLastError: Longint; inline;
Description: To be documented


[Expand]
function __WSAFDIsSet(s: TSOcket; var FDSet: TFDSet): Bool;
Description: To be documented


[Expand]
function inet_pton(Family: Longint; pszAddrString: PChar; pAddrBuf: Pointer): Longint;
Description: To be documented


[Expand]
function InetPtonA(Family: Longint; pszAddrString: PChar; pAddrBuf: Pointer): Longint;
Description: To be documented


[Expand]
function InetPtonW(Family: Longint; pszAddrString: PWideChar; pAddrBuf: Pointer): Longint;
Description: To be documented


[Expand]
function inet_ntop(Family: Longint; pAddr: Pointer; pStringBuf: PChar; StringBufSize: Longint): PChar;
Description: To be documented


[Expand]
function InetNtopA(Family: Longint; pAddr: Pointer; pStringBuf: PChar; StringBufSize: Longint): PChar;
Description: To be documented


[Expand]
function InetNtopW(Family: Longint; pAddr: Pointer; pStringBuf: PWideChar; StringBufSize: Longint): PWideChar;
Description: To be documented


[Expand]
function WSAhtonl( s : TSocket; hostlong : u_long; var lpnetlong : DWORD ): Longint;
Description: To be documented


[Expand]
function WSAhtons( s : TSocket; hostshort : u_short; var lpnetshort : WORD ): Longint;
Description: To be documented


[Expand]
function WSANtohl( s : TSocket; netlong : u_long; var lphostlong : DWORD ): Longint;
Description: To be documented


[Expand]
function WSANtohs( s : TSocket; netshort : u_short; var lphostshort : WORD ): Longint;
Description: To be documented


[Expand]
function WSAMakeSyncReply(Buflen, Error: Word): Longint;
Description: To be documented


[Expand]
function WSAMakeSelectReply(Event, Error: Word): Longint;
Description: To be documented


[Expand]
function WSAGetAsyncBuflen(Param: Longint): Word;
Description: To be documented


[Expand]
function WSAGetAsyncError(Param: Longint): Word;
Description: To be documented


[Expand]
function WSAGetSelectEvent(Param: Longint): Word;
Description: To be documented


[Expand]
function WSAGetSelectError(Param: Longint): Word;
Description: To be documented


[Expand]
procedure FD_CLR(Socket: TSocket; var FDSet: TFDSet);
Description: To be documented


[Expand]
function FD_ISSET(Socket: TSocket; var FDSet: TFDSet): Boolean;
Description: To be documented


[Expand]
procedure FD_SET(Socket: TSocket; var FDSet: TFDSet);
Description: To be documented


[Expand]
procedure FD_ZERO(var FDSet: TFDSet);
Description: To be documented


Winsock2 undocumented functions

[Expand]
function WsControl(Proto:DWORD; Action:DWORD; pRequestInfo:Pointer; var pcbRequestInfoLen:DWORD; pResponseInfo:Pointer; var pcbResponseInfoLen:DWORD):Integer;
Description: To be documented


[Expand]
function getnetbyaddr(addr: Pointer; len, Struct: Integer): PNetEnt;
Description: To be documented


[Expand]
function getnetbyname(name: PChar): PNetEnt;
Description: To be documented


Winsock2 enhanced functions

[Expand]
function WsControlEx(Proto:DWORD; Action:DWORD; pRequestInfo:Pointer; var pcbRequestInfoLen:DWORD; pResponseInfo:Pointer; var pcbResponseInfoLen:DWORD):Integer;
Description: To be documented


RTL text IO functions

[Expand]
function SysTextIOReadChar(var ACh:Char; AUserData:Pointer):Boolean;
Description: Handler for platform TextIOReadChar function


[Expand]
function SysTextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Description: Handler for platform TextIOWriteChar function


[Expand]
function SysTextIOWriteBuffer(ABuffer:PChar; ACount:LongInt; AUserData:Pointer):LongInt;
Description: Handler for platform TextIOWriteBuffer function


Winsock2 helper functions

[Expand]
function Winsock2RedirectInput(s:TSocket):Boolean;
Description: Redirect standard input to the socket specified by s


[Expand]
function Winsock2RedirectOutput(s:TSocket):Boolean;
Description: Redirect standard output to the socket specified by s


[Expand]
function Winsock2ErrorToString(AError:LongInt):String;
Description: To be documented


Return to Unit Reference