sdl3/generated/lib_sdl_net library

Properties

libSdl3Net DynamicLibrary
final

Functions

netAcceptClient(Pointer<NetServer> server, Pointer<Pointer<NetStreamSocket>> clientStream) bool
Create a stream socket for the next pending client connection.
netCompareAddresses(Pointer<NetAddress> a, Pointer<NetAddress> b) int
Compare two NET_Address objects.
netCreateClient(Pointer<NetAddress> address, int port) Pointer<NetStreamSocket>
Begin connecting a socket as a client to a remote server.
netCreateDatagramSocket(Pointer<NetAddress> addr, int port) Pointer<NetDatagramSocket>
Create and bind a new datagram socket.
netCreateServer(Pointer<NetAddress> addr, int port) Pointer<NetServer>
Create a server, which listens for connections to accept.
netDestroyDatagram(Pointer<NetDatagram> dgram) → void
Dispose of a datagram packet previously received.
netDestroyDatagramSocket(Pointer<NetDatagramSocket> sock) → void
Dispose of a previously-created datagram socket.
netDestroyServer(Pointer<NetServer> server) → void
Dispose of a previously-created server.
netDestroyStreamSocket(Pointer<NetStreamSocket> sock) → void
Dispose of a previously-created stream socket.
netFreeLocalAddresses(Pointer<Pointer<NetAddress>> addresses) → void
Free the results from NET_GetLocalAddresses.
netGetAddressStatus(Pointer<NetAddress> address) int
Check if an address is resolved, without blocking.
netGetAddressString(Pointer<NetAddress> address) String?
Get a human-readable string from a resolved address.
netGetConnectionStatus(Pointer<NetStreamSocket> sock) int
Check if a stream socket is connected, without blocking.
netGetLocalAddresses(Pointer<Int32> numAddresses) Pointer<Pointer<NetAddress>>
Obtain a list of local addresses on the system.
netGetStreamSocketAddress(Pointer<NetStreamSocket> sock) Pointer<NetAddress>
Get the remote address of a stream socket.
netGetStreamSocketPendingWrites(Pointer<NetStreamSocket> sock) int
Query bytes still pending transmission on a stream socket.
netGetVersion() int
This function gets the version of the dynamically linked SDL_net library.
netInit() bool
Initialize the SDL_net library.
netQuit() → void
Deinitialize the SDL_net library.
netReadFromStreamSocket(Pointer<NetStreamSocket> sock, Pointer<NativeType> buf, int buflen) int
Receive bytes that a remote system sent to a stream socket.
netReceiveDatagram(Pointer<NetDatagramSocket> sock, Pointer<Pointer<NetDatagram>> dgram) bool
Receive a new packet that a remote system sent to a datagram socket.
netRefAddress(Pointer<NetAddress> address) Pointer<NetAddress>
Add a reference to an NET_Address.
netResolveHostname(String? host) Pointer<NetAddress>
Resolve a human-readable hostname.
netSendDatagram(Pointer<NetDatagramSocket> sock, Pointer<NetAddress> address, int port, Pointer<NativeType> buf, int buflen) bool
Send a new packet over a datagram socket to a remote system.
netSimulateAddressResolutionLoss(int percentLoss) → void
Enable simulated address resolution failures.
netSimulateDatagramPacketLoss(Pointer<NetDatagramSocket> sock, int percentLoss) → void
Enable simulated datagram socket failures.
netSimulateStreamPacketLoss(Pointer<NetStreamSocket> sock, int percentLoss) → void
Enable simulated stream socket failures.
netUnrefAddress(Pointer<NetAddress> address) → void
Drop a reference to an NET_Address.
netWaitUntilConnected(Pointer<NetStreamSocket> sock, int timeout) int
Block until a stream socket has connected to a server.
netWaitUntilInputAvailable(Pointer<Pointer<NativeType>> vsockets, int numsockets, int timeout) int
Block on multiple sockets until at least one has data available.
netWaitUntilResolved(Pointer<NetAddress> address, int timeout) int
Block until an address is resolved.
netWaitUntilStreamSocketDrained(Pointer<NetStreamSocket> sock, int timeout) int
Block until all of a stream socket's pending data is sent.
netWriteToStreamSocket(Pointer<NetStreamSocket> sock, Pointer<NativeType> buf, int buflen) bool
Send bytes over a stream socket to a remote system.