winsock2-go

module
v0.0.0-...-296f279 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2024 License: BSD-3-Clause

README

winsock2-go

WinSock2 API binding for Go without CGO.

API StatusInstallationUsageLicense


API Status

Click to expand
Status Function C++ Notes
implemented __WSAFDIsSet __WSAFDIsSet
implemented Accept accept
implemented Bind bind
implemented CloseSocket closesocket
implemented Connect connect
implemented FreeAddrInfoA freeaddrinfo
unimplemented FreeAddrInfoEx FreeAddrInfoEx
unimplemented FreeAddrInfoExW FreeAddrInfoExW
implemented FreeAddrInfoW FreeAddrInfoW
implemented GetAddrInfoA getaddrinfo
unimplemented GetAddrInfoExA GetAddrInfoExA
unimplemented GetAddrInfoExCancel GetAddrInfoExCancel
unimplemented GetAddrInfoExOverlappedResult GetAddrInfoExOverlappedResult
unimplemented GetAddrInfoExW GetAddrInfoExW
implemented GetAddrInfoW GetAddrInfoW
implemented GetHostByAddr gethostbyaddr
implemented GetHostByName gethostbyname
implemented GetHostNameA gethostname
implemented GetHostNameW GetHostNameW
implemented GetNameInfoA getnameinfo
implemented GetNameInfoW GetNameInfoW
implemented GetPeerName getpeername
implemented GetProtoByName getprotobyname
implemented GetProtoByNumber getprotobynumber
implemented GetServByName getservbyname
implemented GetServByPort getservbyport
implemented GetSockName getsockname
implemented GetSockOpt getsockopt
implemented Htond htond Reimplemented in pure Go.
implemented Htonf htonf Reimplemented in pure Go.
implemented Htonl htonl Reimplemented in pure Go.
implemented Htonll htonll Reimplemented in pure Go.
implemented Htons htons Reimplemented in pure Go.
implemented InetAddr inet_addr
implemented InetNtoa inet_ntoa Reimplemented in pure Go.
implemented InetNtop inet_ntop
implemented InetNtopW InetNtopW
implemented InetPton inet_pton
implemented InetPtonW InetPtonW
implemented IoctlSocket ioctlsocket
implemented Listen listen
unimplemented Ntohd ntohd Ignored.
unimplemented Ntohf ntohf Ignored.
implemented Ntohl ntohl Reimplemented in pure Go.
unimplemented Ntohll ntohll Ignored.
implemented Ntohs ntohs Reimplemented in pure Go.
implemented Recv recv
implemented RecvFrom recvfrom
implemented Select select
implemented Send send
implemented SendTo sendto
unimplemented SetAddrInfoExA SetAddrInfoExA
unimplemented SetAddrInfoExW SetAddrInfoExW
implemented SetSockOpt setsockopt
implemented Shutdown shutdown
implemented Socket socket
unimplemented SocketNotificationRetrieveEvents SocketNotificationRetrieveEvents Ignored.
unimplemented Wah* Ignored.
unimplemented WEP WEP Ignored.
unimplemented WPUCompleteOverlappedRequest WPUCompleteOverlappedRequest Ignored.
unimplemented WPUGetProviderPathEx WPUGetProviderPathEx Ignored.
partial WSAAccept WSAAccept The condition and callbackData parameters are always ignored.
implemented WSAAddressToStringA WSAAddressToStringA
implemented WSAAddressToStringW WSAAddressToStringW
unimplemented WSAAdvertiseProvider WSAAdvertiseProvider Ignored.
unimplemented WSAAsyncGetHostByAddr WSAAsyncGetHostByAddr Ignored.
unimplemented WSAAsyncGetHostByName WSAAsyncGetHostByName Ignored.
unimplemented WSAAsyncGetProtoByName WSAAsyncGetProtoByName Ignored.
unimplemented WSAAsyncGetProtoByNumber WSAAsyncGetProtoByNumber Ignored.
unimplemented WSAAsyncGetServByName WSAAsyncGetServByName Ignored.
unimplemented WSAAsyncGetServByPort WSAAsyncGetServByPort Ignored.
unimplemented WSAAsyncSelect WSAAsyncSelect Ignored.
unimplemented WSACancelAsyncRequest WSACancelAsyncRequest Ignored.
unimplemented WSACancelBlockingCall WSACancelBlockingCall Ignored.
implemented WSACleanup WSACleanup
implemented WSACloseEvent WSACloseEvent
implemented WSAConnect WSAConnect
broken WSAConnectByList WSAConnectByList Can't get it to work (SocketAddressList issue?).
implemented WSAConnectByNameA WSAConnectByNameA
implemented WSAConnectByNameW WSAConnectByNameW
implemented WSACreateEvent WSACreateEvent
implemented WSADuplicateSocketA WSADuplicateSocketA
implemented WSADuplicateSocketW WSADuplicateSocketW
implemented WSAEnumNameSpaceProvidersA WSAEnumNameSpaceProvidersA
implemented WSAEnumNameSpaceProvidersExA WSAEnumNameSpaceProvidersExA
implemented WSAEnumNameSpaceProvidersExW WSAEnumNameSpaceProvidersExW
implemented WSAEnumNameSpaceProvidersW WSAEnumNameSpaceProvidersW
implemented WSAEnumNetworkEvents WSAEnumNetworkEvents
implemented WSAEnumProtocolsA WSAEnumProtocolsA
implemented WSAEnumProtocolsW WSAEnumProtocolsW
implemented WSAEventSelect WSAEventSelect
broken WSAGetLastError WSAGetLastError Always returns 0.
implemented WSAGetOverlappedResult WSAGetOverlappedResult
broken WSAGetQOSByName WSAGetQOSByName The WSABuf isn't populated, even with a NT string.
broken WSAGetServiceClassInfoA WSAGetServiceClassInfoA Can't get it to work: "An invalid argument was supplied.".
broken WSAGetServiceClassInfoW WSAGetServiceClassInfoW Can't get it to work: "An invalid argument was supplied.".
broken WSAGetServiceClassNameByClassIdA WSAGetServiceClassNameByClassIdA Crash, tried many approaches without success. (0xc0000005 - Access Violation)
broken WSAGetServiceClassNameByClassIdW WSAGetServiceClassNameByClassIdW Crash, tried many approaches without success. (0xc0000005 - Access Violation)
implemented WSAHtonl WSAHtonl
implemented WSAHtons WSAHtons
broken WSAInstallServiceClassA WSAInstallServiceClassA Raise an "A socket operation was attempted to an unreachable host" error(?).
broken WSAInstallServiceClassW WSAInstallServiceClassW Raise an "A socket operation was attempted to an unreachable host" error(?).
partial WSAIoctl WSAIoctl The completionRoutine parameter is always ignored.
unimplemented WSAIsBlocking WSAIsBlocking Ignored.
implemented WSAJoinLeaf WSAJoinLeaf Untested.
implemented WSALookupServiceBeginA WSALookupServiceBeginA
implemented WSALookupServiceBeginW WSALookupServiceBeginW
implemented WSALookupServiceEnd WSALookupServiceEnd
implemented WSALookupServiceNextA WSALookupServiceNextA
broken WSALookupServiceNextW WSALookupServiceNextW Crash, even with a valid handle from WSALookupServiceBeginW.
partial WSANSPIoctl WSANSPIoctl The completion parameter is always ignored.
implemented WSANtohl WSANtohl
implemented WSANtohs WSANtohs
implemented WSAPoll WSAPoll
unimplemented WSAProviderCompleteAsyncCall WSAProviderCompleteAsyncCall Ignored.
partial WSAProviderConfigChange WSAProviderConfigChange The completionRoutine parameter is always ignored.
partial WSARecv WSARecv The completionRoutine parameter is always ignored.
implemented WSARecvDisconnect WSARecvDisconnect
partial WSARecvFrom WSARecvFrom The completionRoutine parameter is always ignored.
implemented WSARemoveServiceClass WSARemoveServiceClass
implemented WSAResetEvent WSAResetEvent
partial WSASend WSASend The completionRoutine parameter is always ignored.
implemented WSASendDisconnect WSASendDisconnect
partial WSASendMsg WSASendMsg Untested / The completionRoutine parameter is always ignored.
partial WSASendTo WSASendTo The completionRoutine parameter is always ignored.
unimplemented WSASetBlockingHook WSASetBlockingHook Ignored.
implemented WSASetEvent WSASetEvent
implemented WSASetLastError WSASetLastError Seems to works, not sure with the GetLastError issue.
implemented WSASetServiceA WSASetServiceA Seems to works, not depth tested.
implemented WSASetServiceW WSASetServiceW Seems to works, not depth tested.
implemented WSASocketA WSASocketA
implemented WSASocketW WSASocketW
implemented WSAStartup WSAStartup
implemented WSAStringToAddressA WSAStringToAddressA
implemented WSAStringToAddressW WSAStringToAddressW
unimplemented WSAUnadvertiseProvider WSAUnadvertiseProvider Ignored.
unimplemented WSAUnhookBlockingHook WSAUnhookBlockingHook Ignored.
implemented WSAWaitForMultipleEvents WSAWaitForMultipleEvents
unimplemented WSApSetPostRoutine WSApSetPostRoutine Ignored.
unimplemented WSC* Ignored.

implemented Implemented partial Partial broken Broken unimplemented Unimplemented


Installation

To install the package, use go get:

go get -u github.com/K4rian/winsock2-go

Then import it in your project:

import "github.com/K4rian/winsock2-go/ws2"

Usage

See examples/

License

BSD 3-Clause

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL