sdlNetGetStreamSocketAddress function
Get the remote address of a stream socket.
This reports the address of the remote side of a stream socket, which might still be pending connnection.
This adds a reference to the address; the caller must call SDLNet_UnrefAddress() when done with it.
\param sock the stream socket to query. \returns the socket's remote address, or NULL on error; call SDL_GetError() for details.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL_Net 3.0.0.
extern SDL_DECLSPEC SDLNet_Address * SDLCALL SDLNet_GetStreamSocketAddress(SDLNet_StreamSocket *sock)
Implementation
Pointer<SdlNetAddress> sdlNetGetStreamSocketAddress(
Pointer<SdlNetStreamSocket> sock) {
final sdlNetGetStreamSocketAddressLookupFunction = libSdl3Net.lookupFunction<
Pointer<SdlNetAddress> Function(Pointer<SdlNetStreamSocket> sock),
Pointer<SdlNetAddress> Function(
Pointer<SdlNetStreamSocket> sock)>('SDLNet_GetStreamSocketAddress');
return sdlNetGetStreamSocketAddressLookupFunction(sock);
}