aardio 文档

wsock 库模块帮助文档

wsock 成员列表

wsock.?

其他函数请查看库源码。
一般不需要直接使用这些库函数。
应改用 wsock.tcp.client 或 wsock.udp.client 等库

wsock.WSAAsyncSelect

Ws2_32.api("WSAAsyncSelect","int(POINTER s,int hwnd,int Message,int event)");

wsock.WSAFDIsSet

Ws2_32.api("__WSAFDIsSet","int(POINTER s,struct& passed_set)");

wsock.WSAIoctl

Ws2_32.api("WSAIoctl","int(POINTER s,INT dwIoControlCode, struct lpvInBuffer,INT cbInBuffer, struct lpvOutBuffer,INT cbOutBuffer,INT & lpcbBytesReturned,  pointer lpOverlapped,  pointer lpCompletionRoutine )");

wsock._INVALID_SOCKET

_INVALID_HANDLE_VALUE;

wsock.accept(套接字句柄)

创建一个新的套接字来与客户套接字创建连接通道,
如果连接成功,就返回新创建的套接字句柄

wsock.bind

Ws2_32.api("bind","int(POINTER s, struct name,int namelen)" );

wsock.close()

与wsock.open()配对使用,
使用wsock库以后必须调用此函数释放资源,
如果忘记配对调用此函数,在线程结束时将自动调用

wsock.closesocket

Ws2_32.api("closesocket","int(POINTER s)");

wsock.connect

Ws2_32.api("connect","int(POINTER s,struct& sockstruct,int structlen)");

wsock.fd_set()

返回对象:wsockFdSetObject

wsock.getFreePort(ip,套接字类型,协议类型)

获取空闲服务端口,
可选在参数中指定IP地址,其他参数不必指定

分配的端口即使没有马上使用,
系统下次分配的空闲端口仍然是递增分配下一个端口号,
动态分配空闲端口为49152到65535之间的值,
XP系统则为 1025到5000之间的值,
命令行输入 netsh int ipv4 show dynamicport tcp 看动态端口范围,
安装 Hyper-V 会导致动态起始端口变为 1024 导致常用端口冲突

wsock.getIp("字符串参数")

解析域名,可返回一个或多个IP
如果不指定任何参数,返回内网IP,

优先取192.168.1 开头的IP,请改用 wsock.getLocalIp 函数,

如果要更优先获取当前上网卡的本机IP,
请改用 wsock.tcp.client.getLocalIp 函数

wsock.getIpAddr(请输入域名)

解析域名,
返回in_addr或in_addr结构体数组
返回值2为AF_INET或AF_INET6

wsock.getLocalIp()

返回内网IP,优先取192.168.1 开头的IP,

如果要更优先获取当前上网卡的本机IP,
请改用 wsock.tcp.client.getLocalIp 函数

wsock.gethostbyaddr

Ws2_32.api("gethostbyaddr","pointer(string addr,int length,int thetype)")

wsock.gethostbyname

Ws2_32.api("gethostbyname","pointer(string szHost)" );

wsock.gethostname

Ws2_32.api("gethostname","int(str &szHost,int len)" );

wsock.getpeername

Ws2_32.api("getpeername","int(POINTER s,struct& sockaddr,int& len)")

wsock.getsockname

Ws2_32.api("getsockname","int(POINTER s,struct& sockaddr,int& len)")

wsock.getsockopt

Ws2_32.api("getsockopt","int(POINTER s,int level,int optname,struct&optval,int& optlen)")

wsock.getsockoptByInt

Ws2_32.api("getsockopt","int(POINTER s,int level,int optname,int&optval,int& optlen)")

wsock.hostent

记录主机信息的结构体

wsock.htonl

Ws2_32.api("htonl","INT(INT hostlong)");

wsock.htons

Ws2_32.api("htons","WORD(WORD hostshort)" );

wsock.in6_addr()

IPv6 地址结构

返回对象:in6AddrObject

wsock.in_addr()

创建 in_addr 结构体,表示 IPv4 地址。
返回值可用 tostring 函数转换为字符串,
可用 tonumber 函数转换为数值,Ipv4 实际存为 32 位整数。

返回对象:inAddrObject

wsock.inet_addr

Ws2_32.api("inet_addr","INT(string s)");

wsock.inet_ntoa(/*in_addr*/)

in_addr 结构体或数值转换为字符串格式 IP 地址

wsock.ioctlsocket

Ws2_32.api("ioctlsocket","int(POINTER s,int cmd, INT &argp)")

wsock.listen

Ws2_32.api("listen","int(POINTER s,int backlog)");

wsock.ntohl

Ws2_32.api("ntohl","INT(INT netlong)");

wsock.ntohs

Ws2_32.api("ntohs","WORD(WORD netshort)");

wsock.open()

使用wsock库其他函数以前必须调用此函数

wsock.recv

Ws2_32.api("recv","int(POINTER s,string& buf,int len,int flags)" );

wsock.recvbyte

Ws2_32.api("recv","int(POINTER s,BYTE& b,int len,int flags)");

wsock.recvfrom

Ws2_32.api("recvfrom","int(POINTER s,string& Buf,int length,int flags, struct& sad, int& fromlen)")

wsock.select(nfds,readfds,writefds,exceptfds,tv_sec,tv_usec)

所有参数可选,
成功返回套接字数目,超时返回0,出错返回-1/*_SOCKET_ERROR*/

wsock.send

Ws2_32.api("send","int(POINTER s,string msg,int msglen,int flag)");

wsock.sendto

Ws2_32.api("sendto","int(POINTER s,pointer Buf,int length,int flags, struct& sad, int& tolen)")

wsock.setsockopt

Ws2_32.api("setsockopt","int(POINTER s,word level,word optname,struct optval,int optlen)")

wsock.setsockoptByInt

Ws2_32.api("setsockopt","int(POINTER s,word level,word optname,int& optval,int optlen)")

wsock.shutdown

Ws2_32.api("shutdown","int(POINTER s,int how)")

wsock.sockaddrParse

字符串转换为 sockaddr_in 或 sockaddr_in6 结构体

wsock.sockaddrParse(strAddress)

字符串转换为 sockaddr_in 或 sockaddr_in6 结构体。
参数 @1 可指定 IPV4 或 IPV6 地址,可选包含端口号。
可选用参数 @2 指定端口号

wsock.sockaddrStringify

sockaddr 指针或结构体转字符串

wsock.sockaddrStringify(sockaddr,size,protocolInfo)

sockaddr 转字符串。
@sockaddr 可指定sockaddr 指针或结构体。
size 指定参数 @1 指向的内存长度。
@protocolInfo 不必指定

wsock.sockaddr_in("主机",端口)

返回 sockaddr_in 结构体,所有参数可选。
参数 @1 可以使用域名、IP、数值,
如果参数 @1 是字符串,可在 IP 或域名后指定端口号。
如果参数 @1 传入 sockaddr_in 则直接返回该结构体。
参数错误返回 null 。

返回结构体可用 tostring 函数转为字符串,
也可以用 tonumber 转换为数值。

wsock.sockaddr_in()

返回对象:sockaddrInObject

wsock.sockaddr_in6("主机",端口)

返回sockaddr_in6结构体,所有参数可选
参数@1可以使用域名、IPv6地址,
如果IPv6地址包含端口号,IPv6地址应置于中括号内部,
域名后不允许指定端口号
如果参数@1传入sockaddr_in6则直接返回该结构体
参数错误返回null

wsock.sockaddr_in6()

返回对象:sockaddrInObject

wsock.socket

Ws2_32.api("socket","pointer(int af,int type,int protoco)" );

wsock.versionRequired

支持的版本,
用于在open函数中WSAStartup的第一个参数

in6AddrObject 成员列表

in6AddrObject.u.Byte

16个8位字节数组

in6AddrObject.u.Word

8个16位字数组

inAddrObject 成员列表

inAddrObject.S_un.S_addr

S_addr

inAddrObject.S_un.S_un_b.s_b1

s_b1

inAddrObject.S_un.S_un_b.s_b2

s_b2

inAddrObject.S_un.S_un_b.s_b4

s_b4

inAddrObject.S_un.S_un_w.s_w1

s_w1

inAddrObject.S_un.S_un_w.s_w2

s_w2

sockaddrInObject 成员列表

sockaddrInObject.sin6_addr

地址

返回对象:in6AddrObject

sockaddrInObject.sin6_family

IPv6地址类型,
值为_AF_INET6

sockaddrInObject.sin6_flowinfo

IPv6的流信息

sockaddrInObject.sin6_port

端口

sockaddrInObject.sin6_scope_id

标识地址范围

sockaddrInObject.sin_addr

地址

返回对象:inAddrObject

sockaddrInObject.sin_family

IPv4地址类型,
值为_AF_INET

sockaddrInObject.sin_port

端口

sockaddrInObject.sin_zero

对齐数据

ws232dllObject 成员列表

ws232dllObject.AcceptEx()

AcceptEx

ws232dllObject.ConnectEx()

ConnectEx

ws232dllObject.DisconnectEx()

DisconnectEx

ws232dllObject.EnumProtocols()

EnumProtocols

ws232dllObject.FreeAddrInfoEx()

FreeAddrInfoEx

ws232dllObject.FreeAddrInfoW()

FreeAddrInfoW

ws232dllObject.GetAcceptExSockaddrs()

GetAcceptExSockaddrs

ws232dllObject.GetAddrInfoEx()

GetAddrInfoEx

ws232dllObject.GetAddrInfoExCancel()

GetAddrInfoExCancel

ws232dllObject.GetAddrInfoExOverlappedResult()

GetAddrInfoExOverlappedResult

ws232dllObject.GetAddrInfoW()

GetAddrInfoW

ws232dllObject.GetAddressByName()

GetAddressByName

ws232dllObject.GetHostNameW()

GetHostNameW

ws232dllObject.GetNameByType()

GetNameByType

ws232dllObject.GetNameInfoW()

GetNameInfoW

ws232dllObject.GetService()

GetService

ws232dllObject.GetTypeByName()

GetTypeByName

ws232dllObject.InetNtop()

InetNtop

ws232dllObject.InetPton()

InetPton

ws232dllObject.RIOCloseCompletionQueue()

RIOCloseCompletionQueue

ws232dllObject.RIOCreateCompletionQueue()

RIOCreateCompletionQueue

ws232dllObject.RIOCreateRequestQueue()

RIOCreateRequestQueue

ws232dllObject.RIODequeueCompletion()

RIODequeueCompletion

ws232dllObject.RIODeregisterBuffer()

RIODeregisterBuffer

ws232dllObject.RIONotify()

RIONotify

ws232dllObject.RIOReceive()

RIOReceive

ws232dllObject.RIOReceiveEx()

RIOReceiveEx

ws232dllObject.RIORegisterBuffer()

RIORegisterBuffer

ws232dllObject.RIOResizeCompletionQueue()

RIOResizeCompletionQueue

ws232dllObject.RIOResizeRequestQueue()

RIOResizeRequestQueue

ws232dllObject.RIOSend()

RIOSend

ws232dllObject.RIOSendEx()

RIOSendEx

ws232dllObject.SetAddrInfoEx()

SetAddrInfoEx

ws232dllObject.SetService()

SetService

ws232dllObject.SetSocketMediaStreamingMode()

SetSocketMediaStreamingMode

ws232dllObject.TransmitFile()

TransmitFile

ws232dllObject.TransmitPackets()

TransmitPackets

ws232dllObject.WSAAccept()

WSAAccept

ws232dllObject.WSAAddressToString()

WSAAddressToString

ws232dllObject.WSAAsyncGetHostByAddr()

WSAAsyncGetHostByAddr

ws232dllObject.WSAAsyncGetHostByName()

WSAAsyncGetHostByName

ws232dllObject.WSAAsyncGetProtoByName()

WSAAsyncGetProtoByName

ws232dllObject.WSAAsyncGetProtoByNumber()

WSAAsyncGetProtoByNumber

ws232dllObject.WSAAsyncGetServByName()

WSAAsyncGetServByName

ws232dllObject.WSAAsyncGetServByPort()

WSAAsyncGetServByPort

ws232dllObject.WSAAsyncSelect()

WSAAsyncSelect

ws232dllObject.WSACancelAsyncRequest(taskhandle)

WSACancelAsyncRequest

ws232dllObject.WSACancelBlockingCall()

WSACancelBlockingCall

ws232dllObject.WSACleanup()

WSACleanup

ws232dllObject.WSACloseEvent(hEvent)

WSACloseEvent

ws232dllObject.WSAConnect()

WSAConnect

ws232dllObject.WSAConnectByList()

WSAConnectByList

ws232dllObject.WSAConnectByName()

WSAConnectByName

ws232dllObject.WSACreateEvent()

WSACreateEvent

ws232dllObject.WSADeleteSocketPeerTargetName()

WSADeleteSocketPeerTargetName

ws232dllObject.WSADuplicateSocket()

WSADuplicateSocket

ws232dllObject.WSAEnumNameSpaceProviders()

WSAEnumNameSpaceProviders

ws232dllObject.WSAEnumNameSpaceProvidersEx()

WSAEnumNameSpaceProvidersEx

ws232dllObject.WSAEnumNetworkEvents()

WSAEnumNetworkEvents

ws232dllObject.WSAEnumProtocols()

WSAEnumProtocols

ws232dllObject.WSAEventSelect()

WSAEventSelect

ws232dllObject.WSAFDIsSet()

__WSAFDIsSet

ws232dllObject.WSAGetLastError()

WSAGetLastError

ws232dllObject.WSAGetOverlappedResult()

WSAGetOverlappedResult

ws232dllObject.WSAGetQOSByName()

WSAGetQOSByName

ws232dllObject.WSAGetServiceClassInfo()

WSAGetServiceClassInfo

ws232dllObject.WSAGetServiceClassNameByClassId()

WSAGetServiceClassNameByClassId

ws232dllObject.WSAHtonl()

WSAHtonl

ws232dllObject.WSAImpersonateSocketPeer()

WSAImpersonateSocketPeer

ws232dllObject.WSAInstallServiceClass()

WSAInstallServiceClass

ws232dllObject.WSAIoctl()

WSAIoctl

ws232dllObject.WSAIsBlocking()

WSAIsBlocking

ws232dllObject.WSAJoinLeaf()

WSAJoinLeaf

ws232dllObject.WSALookupServiceBegin()

WSALookupServiceBegin

ws232dllObject.WSALookupServiceEnd()

WSALookupServiceEnd

ws232dllObject.WSALookupServiceNext()

WSALookupServiceNext

ws232dllObject.WSANSPIoctl()

WSANSPIoctl

ws232dllObject.WSANtohl()

WSANtohl

ws232dllObject.WSAPoll()

WSAPoll

ws232dllObject.WSAProviderConfigChange()

WSAProviderConfigChange

ws232dllObject.WSAQuerySocketSecurity()

WSAQuerySocketSecurity

ws232dllObject.WSARecv()

WSARecv

ws232dllObject.WSARecvDisconnect()

WSARecvDisconnect

ws232dllObject.WSARecvEx()

WSARecvEx

ws232dllObject.WSARecvFrom()

WSARecvFrom

ws232dllObject.WSARecvMsg()

WSARecvMsg

ws232dllObject.WSARemoveServiceClass()

WSARemoveServiceClass

ws232dllObject.WSAResetEvent()

WSAResetEvent

ws232dllObject.WSARevertImpersonation()

WSARevertImpersonation

ws232dllObject.WSASend()

WSASend

ws232dllObject.WSASendDisconnect()

WSASendDisconnect

ws232dllObject.WSASendMsg()

WSASendMsg

ws232dllObject.WSASendTo()

WSASendTo

ws232dllObject.WSASetBlockingHook(lpBlockFunc)

WSASetBlockingHook

ws232dllObject.WSASetEvent()

WSASetEvent

ws232dllObject.WSASetLastError(iErrorCode)

WSASetLastError

ws232dllObject.WSASetService()

WSASetService

ws232dllObject.WSASetSocketPeerTargetName()

WSASetSocketPeerTargetName

ws232dllObject.WSASetSocketSecurity()

WSASetSocketSecurity

ws232dllObject.WSASocket()

WSASocket

ws232dllObject.WSAStartup()

WSAStartup

ws232dllObject.WSAStringToAddress()

WSAStringToAddress

ws232dllObject.WSAUnhookBlockingHook()

WSAUnhookBlockingHook

ws232dllObject.WSAWaitForMultipleEvents()

WSAWaitForMultipleEvents

ws232dllObject.accept()

accept

ws232dllObject.bind()

bind

ws232dllObject.closesocket()

closesocket

ws232dllObject.connect()

connect

ws232dllObject.freeaddrinfo()

freeaddrinfo

ws232dllObject.gai_strerror()

gai_strerror

ws232dllObject.getaddrinfo()

getaddrinfo

ws232dllObject.gethostbyaddr()

gethostbyaddr

ws232dllObject.gethostbyname()

gethostbyname

ws232dllObject.gethostname()

gethostname

ws232dllObject.getipv4sourcefilter()

getipv4sourcefilter

ws232dllObject.getnameinfo()

getnameinfo

ws232dllObject.getpeername()

getpeername

ws232dllObject.getprotobyname()

getprotobyname

ws232dllObject.getprotobynumber()

getprotobynumber

ws232dllObject.getservbyname()

getservbyname

ws232dllObject.getservbyport()

getservbyport

ws232dllObject.getsockname()

getsockname

ws232dllObject.getsockopt()

getsockopt

ws232dllObject.getsourcefilter()

getsourcefilter

ws232dllObject.htond()

htond

ws232dllObject.htonf()

htonf

ws232dllObject.htonl()

htonl

ws232dllObject.htonll()

htonll

ws232dllObject.inet_addr()

inet_addr

ws232dllObject.inet_ntoa()

inet_ntoa

ws232dllObject.ioctlsocket()

ioctlsocket

ws232dllObject.listen()

listen

ws232dllObject.ntohd()

ntohd

ws232dllObject.ntohf()

ntohf

ws232dllObject.ntohl()

ntohl

ws232dllObject.ntohll()

ntohll

ws232dllObject.recv()

recv

ws232dllObject.recvfrom()

recvfrom

ws232dllObject.select()

select

ws232dllObject.send()

send

ws232dllObject.sendto()

sendto

ws232dllObject.setipv4sourcefilter()

setipv4sourcefilter

ws232dllObject.setsockopt()

setsockopt

ws232dllObject.setsourcefilter()

setsourcefilter

ws232dllObject.shutdown()

shutdown

ws232dllObject.socket()

socket

wsock._wsadata 成员列表

wsock._wsadata.description

描述

wsock._wsadata.highVersion

支持的最高版本

wsock._wsadata.maxSockets

单进程可打开的最大套接字数

wsock._wsadata.maxUdpDg

最大数据包大小,0为无限制

wsock._wsadata.systemStatus

状态和配置

wsock._wsadata.version

版本

wsockFdSetObject 成员列表

wsockFdSetObject.fd_array

文件句柄数组

wsockFdSetObject.fd_count

文件句柄数

wsockFdSetObject.set()

返回对象:wsockFdSetObject

wsockFdSetObject.set(hSocket)

设置文件描述符,成功返回对象自身

全局常量

::Ws2_32

Ws2_32.dll在wsock支持库中加载

返回对象:ws232dllObject

自动完成常量

_AF_APPLETALK=0x10
_AF_CCITT=0xA
_AF_CHAOS=5
_AF_DATAKIT=9
_AF_DECNET=0xC
_AF_DLI=0xD
_AF_ECMA=8
_AF_HYLINK=0xF
_AF_IMPLINK=3
_AF_INET=2
_AF_INET6=23
_AF_ISO=7
_AF_LAT=0xE
_AF_MAX=0x12
_AF_NETBIOS=0x11
_AF_NS=6
_AF_OSI=7
_AF_PUP=4
_AF_SNA=0xB
_AF_UNIX=1
_AF_UNSPEC=0x0
_FD_ACCEPT=8
_FD_CLOSE=0x20
_FD_CONNECT=0x10
_FD_OOB=4
_FD_READ=1
_FD_SETSIZE=0x40
_FD_WRITE=2
_FIOASYNC=0x8004667D
_FIONBIO=0x8004667E
_FIONREAD=0x8004667F
_HOST_NOT_FOUND=0x2AF9
_IMPLINK_HIGHEXPER=0x9E
_IMPLINK_IP=0x9B
_IMPLINK_LOWEXPER=0x9C
_INADDR_ANY=0x0
_INADDR_BROADCAST=-1
_INADDR_LOOPBACK=0x7F000001
_INADDR_NONE=-1
_IN_CLASSA_HOST=0xFFFFFF
_IN_CLASSA_MAX=0x80
_IN_CLASSA_NET=0xFF000000
_IN_CLASSA_NSHIFT=0x18
_IN_CLASSB_HOST=0xFFFF
_IN_CLASSB_MAX=0x10000
_IN_CLASSB_NET=0xFFFF0000
_IN_CLASSB_NSHIFT=0x10
_IN_CLASSC_HOST=0xFF
_IN_CLASSC_NET=0xFFFFFF00
_IN_CLASSC_NSHIFT=8
_IOCPARM_MASK=0x7F
_IOC_IN=0x80000000
_IOC_INOUT=0xC0000000
_IOC_OUT=0x40000000
_IOC_VOID=0x20000000
_IPPORT_BIFFUDP=0x200
_IPPORT_CMDSERVER=0x202
_IPPORT_DAYTIME=0xD
_IPPORT_DISCARD=9
_IPPORT_ECHO=7
_IPPORT_EFSSERVER=0x208
_IPPORT_EXECSERVER=0x200
_IPPORT_FINGER=0x4F
_IPPORT_FTP=0x15
_IPPORT_HTTP=0x50
_IPPORT_LOGINSERVER=0x201
_IPPORT_MTP=0x39
_IPPORT_NAMESERVER=0x2A
_IPPORT_NETSTAT=0xF
_IPPORT_RESERVED=0x400
_IPPORT_RJE=0x4D
_IPPORT_ROUTESERVER=0x208
_IPPORT_SMTP=0x19
_IPPORT_SUPDUP=0x5F
_IPPORT_SYSTAT=0xB
_IPPORT_TELNET=0x17
_IPPORT_TFTP=0x45
_IPPORT_TIMESERVER=0x25
_IPPORT_TTYLINK=0x57
_IPPORT_WHOIS=0x2B
_IPPORT_WHOSERVER=0x201
_IPPROTO_AH=0x33
_IPPROTO_CBT=7
_IPPROTO_DSTOPTS=0x3C
_IPPROTO_EGP=8
_IPPROTO_ESP=0x32
_IPPROTO_FRAGMENT=0x2C
_IPPROTO_GGP=3
_IPPROTO_HOPOPTS=0x0
_IPPROTO_ICLFXBM=0x4E
_IPPROTO_ICMP=1
_IPPROTO_ICMPV6=0x3A
_IPPROTO_IDP=0x16
_IPPROTO_IGMP=2
_IPPROTO_IGP=9
_IPPROTO_IPV4=4
_IPPROTO_IPV6=0x29
_IPPROTO_L2TP=0x73
_IPPROTO_MAX=0x100
_IPPROTO_ND=0x4D
_IPPROTO_NONE=0x3B
_IPPROTO_PGM=0x71
_IPPROTO_PIM=0x67
_IPPROTO_PUP=0xC
_IPPROTO_RAW=0xFF
_IPPROTO_RDP=0x1B
_IPPROTO_RESERVED_IPSEC=0x102
_IPPROTO_RESERVED_IPSECOFFLOAD=0x103
_IPPROTO_RESERVED_MAX=0x104
_IPPROTO_RESERVED_RAW=0x101
_IPPROTO_ROUTING=0x2B
_IPPROTO_SCTP=0x84
_IPPROTO_ST=5
_IPPROTO_TCP=6
_IPPROTO_UDP=0x11
_IP_OPTIONS=1
_MSG_DONTROUTE=4
_MSG_MAXIOVLEN=0x10
_MSG_OOB=1
_MSG_PEEK=2
_NO_ADDRESS=0x2AFC
_NO_DATA=0x2AFC
_NO_RECOVERY=0x2AFB
_PF_APPLETALK=0x10
_PF_CCITT=0xA
_PF_CHAOS=5
_PF_DATAKIT=9
_PF_DECNET=0xC
_PF_DLI=0xD
_PF_ECMA=8
_PF_HYLINK=0xF
_PF_IMPLINK=3
_PF_INET=2
_PF_ISO=7
_PF_LAT=0xE
_PF_MAX=0x12
_PF_NETBIOS=0x11
_PF_NS=6
_PF_OSI=7
_PF_PUP=4
_PF_SNA=0xB
_PF_UNIX=1
_PF_UNSPEC=0x0
_SIO_ABSORB_RTRALERT=0x98000005
_SIO_INDEX_ADD_MCAST=0x9800000A
_SIO_INDEX_BIND=0x98000008
_SIO_INDEX_DEL_MCAST=0x9800000B
_SIO_INDEX_MCASTIF=0x98000009
_SIO_KEEPALIVE_VALS=0x98000004
_SIO_LIMIT_BROADCASTS=0x98000007
_SIO_RCVALL=0x98000001
_SIO_RCVALL_IF=0x9800000E
_SIO_RCVALL_IGMPMCAST=0x98000003
_SIO_RCVALL_MCAST=0x98000002
_SIO_RCVALL_MCAST_IF=0x9800000D
_SIO_UCAST_IF=0x98000006
_SOCKET_ERROR=-1
_SOCK_DGRAM=2
_SOCK_ERROR=-1
_SOCK_RAW=3
_SOCK_RDM=4
_SOCK_SEQPACKET=5
_SOCK_STREAM=1
_SOL_SOCKET=0xFFFF
_SOMAXCONN=5
_SO_ACCEPTCON=2
_SO_BROADCAST=0x20
_SO_DEBUG=1
_SO_DONTLINGER=0xFFFFFF7F
_SO_DONTROUTE=0x10
_SO_ERROR=0x1007
_SO_KEEPALIVE=8
_SO_LINGER=0x80
_SO_OOBINLINE=0x100
_SO_RCVBUF=0x1002
_SO_RCVLOWAT=0x1004
_SO_RCVTIMEO=0x1006
_SO_REUSEADDR=4
_SO_SNDBUF=0x1001
_SO_SNDLOWAT=0x1003
_SO_SNDTIMEO=0x1005
_SO_TYPE=0x1008
_SO_USELOOPBACK=0x40
_TCP_NODELAY=1
_TRY_AGAIN=0x2AFA
_WSABASEERR=0x2710
_WSADESCRIPTION_LEN=0x100
_WSAHOST_NOT_FOUND=0x2AF9
_WSAIOW=_WSAIOW=function(x,y) {return (0x80000000
_WSANO_ADDRESS=0x2AFC
_WSANO_DATA=0x2AFC
_WSANO_RECOVERY=0x2AFB
_WSASYS_STATUS_LEN=0x80
_WSATRY_AGAIN=0x2AFA

Markdown 格式