Categorygithub.com/K4rian/winsock2-go
repository
0.0.0-20240812002629-296f2798b6b5
Repository: https://github.com/k4rian/winsock2-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

winsock2-go

WinSock2 API binding for Go without CGO.

API StatusInstallationUsageLicense


API Status

Click to expand
StatusFunctionC++Notes
implemented__WSAFDIsSet__WSAFDIsSet
implementedAcceptaccept
implementedBindbind
implementedCloseSocketclosesocket
implementedConnectconnect
implementedFreeAddrInfoAfreeaddrinfo
unimplementedFreeAddrInfoExFreeAddrInfoEx
unimplementedFreeAddrInfoExWFreeAddrInfoExW
implementedFreeAddrInfoWFreeAddrInfoW
implementedGetAddrInfoAgetaddrinfo
unimplementedGetAddrInfoExAGetAddrInfoExA
unimplementedGetAddrInfoExCancelGetAddrInfoExCancel
unimplementedGetAddrInfoExOverlappedResultGetAddrInfoExOverlappedResult
unimplementedGetAddrInfoExWGetAddrInfoExW
implementedGetAddrInfoWGetAddrInfoW
implementedGetHostByAddrgethostbyaddr
implementedGetHostByNamegethostbyname
implementedGetHostNameAgethostname
implementedGetHostNameWGetHostNameW
implementedGetNameInfoAgetnameinfo
implementedGetNameInfoWGetNameInfoW
implementedGetPeerNamegetpeername
implementedGetProtoByNamegetprotobyname
implementedGetProtoByNumbergetprotobynumber
implementedGetServByNamegetservbyname
implementedGetServByPortgetservbyport
implementedGetSockNamegetsockname
implementedGetSockOptgetsockopt
implementedHtondhtondReimplemented in pure Go.
implementedHtonfhtonfReimplemented in pure Go.
implementedHtonlhtonlReimplemented in pure Go.
implementedHtonllhtonllReimplemented in pure Go.
implementedHtonshtonsReimplemented in pure Go.
implementedInetAddrinet_addr
implementedInetNtoainet_ntoaReimplemented in pure Go.
implementedInetNtopinet_ntop
implementedInetNtopWInetNtopW
implementedInetPtoninet_pton
implementedInetPtonWInetPtonW
implementedIoctlSocketioctlsocket
implementedListenlisten
unimplementedNtohdntohdIgnored.
unimplementedNtohfntohfIgnored.
implementedNtohlntohlReimplemented in pure Go.
unimplementedNtohllntohllIgnored.
implementedNtohsntohsReimplemented in pure Go.
implementedRecvrecv
implementedRecvFromrecvfrom
implementedSelectselect
implementedSendsend
implementedSendTosendto
unimplementedSetAddrInfoExASetAddrInfoExA
unimplementedSetAddrInfoExWSetAddrInfoExW
implementedSetSockOptsetsockopt
implementedShutdownshutdown
implementedSocketsocket
unimplementedSocketNotificationRetrieveEventsSocketNotificationRetrieveEventsIgnored.
unimplementedWah*Ignored.
unimplementedWEPWEPIgnored.
unimplementedWPUCompleteOverlappedRequestWPUCompleteOverlappedRequestIgnored.
unimplementedWPUGetProviderPathExWPUGetProviderPathExIgnored.
partialWSAAcceptWSAAcceptThe condition and callbackData parameters are always ignored.
implementedWSAAddressToStringAWSAAddressToStringA
implementedWSAAddressToStringWWSAAddressToStringW
unimplementedWSAAdvertiseProviderWSAAdvertiseProviderIgnored.
unimplementedWSAAsyncGetHostByAddrWSAAsyncGetHostByAddrIgnored.
unimplementedWSAAsyncGetHostByNameWSAAsyncGetHostByNameIgnored.
unimplementedWSAAsyncGetProtoByNameWSAAsyncGetProtoByNameIgnored.
unimplementedWSAAsyncGetProtoByNumberWSAAsyncGetProtoByNumberIgnored.
unimplementedWSAAsyncGetServByNameWSAAsyncGetServByNameIgnored.
unimplementedWSAAsyncGetServByPortWSAAsyncGetServByPortIgnored.
unimplementedWSAAsyncSelectWSAAsyncSelectIgnored.
unimplementedWSACancelAsyncRequestWSACancelAsyncRequestIgnored.
unimplementedWSACancelBlockingCallWSACancelBlockingCallIgnored.
implementedWSACleanupWSACleanup
implementedWSACloseEventWSACloseEvent
implementedWSAConnectWSAConnect
brokenWSAConnectByListWSAConnectByListCan't get it to work (SocketAddressList issue?).
implementedWSAConnectByNameAWSAConnectByNameA
implementedWSAConnectByNameWWSAConnectByNameW
implementedWSACreateEventWSACreateEvent
implementedWSADuplicateSocketAWSADuplicateSocketA
implementedWSADuplicateSocketWWSADuplicateSocketW
implementedWSAEnumNameSpaceProvidersAWSAEnumNameSpaceProvidersA
implementedWSAEnumNameSpaceProvidersExAWSAEnumNameSpaceProvidersExA
implementedWSAEnumNameSpaceProvidersExWWSAEnumNameSpaceProvidersExW
implementedWSAEnumNameSpaceProvidersWWSAEnumNameSpaceProvidersW
implementedWSAEnumNetworkEventsWSAEnumNetworkEvents
implementedWSAEnumProtocolsAWSAEnumProtocolsA
implementedWSAEnumProtocolsWWSAEnumProtocolsW
implementedWSAEventSelectWSAEventSelect
brokenWSAGetLastErrorWSAGetLastErrorAlways returns 0.
implementedWSAGetOverlappedResultWSAGetOverlappedResult
brokenWSAGetQOSByNameWSAGetQOSByNameThe WSABuf isn't populated, even with a NT string.
brokenWSAGetServiceClassInfoAWSAGetServiceClassInfoACan't get it to work: "An invalid argument was supplied.".
brokenWSAGetServiceClassInfoWWSAGetServiceClassInfoWCan't get it to work: "An invalid argument was supplied.".
brokenWSAGetServiceClassNameByClassIdAWSAGetServiceClassNameByClassIdACrash, tried many approaches without success. (0xc0000005 - Access Violation)
brokenWSAGetServiceClassNameByClassIdWWSAGetServiceClassNameByClassIdWCrash, tried many approaches without success. (0xc0000005 - Access Violation)
implementedWSAHtonlWSAHtonl
implementedWSAHtonsWSAHtons
brokenWSAInstallServiceClassAWSAInstallServiceClassARaise an "A socket operation was attempted to an unreachable host" error(?).
brokenWSAInstallServiceClassWWSAInstallServiceClassWRaise an "A socket operation was attempted to an unreachable host" error(?).
partialWSAIoctlWSAIoctlThe completionRoutine parameter is always ignored.
unimplementedWSAIsBlockingWSAIsBlockingIgnored.
implementedWSAJoinLeafWSAJoinLeafUntested.
implementedWSALookupServiceBeginAWSALookupServiceBeginA
implementedWSALookupServiceBeginWWSALookupServiceBeginW
implementedWSALookupServiceEndWSALookupServiceEnd
implementedWSALookupServiceNextAWSALookupServiceNextA
brokenWSALookupServiceNextWWSALookupServiceNextWCrash, even with a valid handle from WSALookupServiceBeginW.
partialWSANSPIoctlWSANSPIoctlThe completion parameter is always ignored.
implementedWSANtohlWSANtohl
implementedWSANtohsWSANtohs
implementedWSAPollWSAPoll
unimplementedWSAProviderCompleteAsyncCallWSAProviderCompleteAsyncCallIgnored.
partialWSAProviderConfigChangeWSAProviderConfigChangeThe completionRoutine parameter is always ignored.
partialWSARecvWSARecvThe completionRoutine parameter is always ignored.
implementedWSARecvDisconnectWSARecvDisconnect
partialWSARecvFromWSARecvFromThe completionRoutine parameter is always ignored.
implementedWSARemoveServiceClassWSARemoveServiceClass
implementedWSAResetEventWSAResetEvent
partialWSASendWSASendThe completionRoutine parameter is always ignored.
implementedWSASendDisconnectWSASendDisconnect
partialWSASendMsgWSASendMsgUntested / The completionRoutine parameter is always ignored.
partialWSASendToWSASendToThe completionRoutine parameter is always ignored.
unimplementedWSASetBlockingHookWSASetBlockingHookIgnored.
implementedWSASetEventWSASetEvent
implementedWSASetLastErrorWSASetLastErrorSeems to works, not sure with the GetLastError issue.
implementedWSASetServiceAWSASetServiceASeems to works, not depth tested.
implementedWSASetServiceWWSASetServiceWSeems to works, not depth tested.
implementedWSASocketAWSASocketA
implementedWSASocketWWSASocketW
implementedWSAStartupWSAStartup
implementedWSAStringToAddressAWSAStringToAddressA
implementedWSAStringToAddressWWSAStringToAddressW
unimplementedWSAUnadvertiseProviderWSAUnadvertiseProviderIgnored.
unimplementedWSAUnhookBlockingHookWSAUnhookBlockingHookIgnored.
implementedWSAWaitForMultipleEventsWSAWaitForMultipleEvents
unimplementedWSApSetPostRoutineWSApSetPostRoutineIgnored.
unimplementedWSC*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