sdl2/generated/lib_sdl_net library

Properties

libSdl2Net DynamicLibrary
final

Functions

sdlNetAddSocket(Pointer<SdlNetSocketSet> set, SdlNetGenericSocket sock) int
Add a socket to a socket set, to be checked for available data.
sdlNetAllocPacket(int size) Pointer<UDPpacket>
Allocate a single UDP packet.
sdlNetAllocPacketV(int howmany, int size) Pointer<Pointer<UDPpacket>>
Allocate a UDP packet vector (array of packets).
sdlNetAllocSocketSet(int maxsockets) Pointer<SdlNetSocketSet>
Allocate a socket set for use with SDLNet_CheckSockets().
sdlNetCheckSockets(Pointer<SdlNetSocketSet> set, int timeout) int
Check a socket set for data availability.
sdlNetDelSocket(Pointer<SdlNetSocketSet> set, SdlNetGenericSocket sock) int
Remove a socket from a set of sockets to be checked for available data.
sdlNetFreePacket(Pointer<UDPpacket> packet) → void
Dispose of a UDP packet.
sdlNetFreePacketV(Pointer<Pointer<UDPpacket>> packetV) → void
Free a UDP packet vector (array of packets).
sdlNetFreeSocketSet(Pointer<SdlNetSocketSet> set) → void
Free a set of sockets allocated by SDLNet_AllocSocketSet().
sdlNetGetError() String?
Get the latest error message from SDL_net.
sdlNetGetLocalAddresses(Pointer<IPaddress> addresses, int maxcount) int
Get the addresses of network interfaces on this system.
sdlNetInit() int
Initialize SDL_net.
sdlNetLinkedVersion() Pointer<SdlVersion>
Query the version of SDL_net that the program is linked against.
sdlNetQuit() → void
Deinitialize SDL_net.
sdlNetResizePacket(Pointer<UDPpacket> packet, int newsize) int
Reallocate a UDP packet's payload space.
sdlNetResolveHost(Pointer<IPaddress> address, String? host, int port) int
Resolve a host name and port to an IP address in network form.
sdlNetResolveIp(Pointer<IPaddress> ip) String?
Resolve an IP address to a host name in canonical form.
sdlNetSetError(String? fmt, Pointer<NativeType> arg1) → void
Set an error message to be retrieved with SDLNet_GetError.
sdlNetTcpAccept(Pointer<TCPsocket> server) Pointer<TCPsocket>
Accept an incoming connection on the given server socket.
sdlNetTcpClose(Pointer<TCPsocket> sock) → void
Close a TCP network socket.
sdlNetTcpGetPeerAddress(Pointer<TCPsocket> sock) Pointer<IPaddress>
Get the IP address of the remote system associated with the socket.
sdlNetTcpOpen(Pointer<IPaddress> ip) Pointer<TCPsocket>
Open a TCP network socket.
sdlNetTcpRecv(Pointer<TCPsocket> sock, Pointer<NativeType> data, int maxlen) int
Receive data from a non-server socket.
sdlNetTcpSend(Pointer<TCPsocket> sock, Pointer<NativeType> data, int len) int
Send data over a non-server socket.
sdlNetUdpBind(Pointer<UDPsocket> sock, int channel, Pointer<IPaddress> address) int
Bind an address to the requested channel on the UDP socket.
sdlNetUdpClose(Pointer<UDPsocket> sock) → void
Close a UDP socket.
sdlNetUdpGetPeerAddress(Pointer<UDPsocket> sock, int channel) Pointer<IPaddress>
Get the IP address of the remote system for a socket and channel.
sdlNetUdpOpen(int port) Pointer<UDPsocket>
Open a UDP network socket.
sdlNetUdpRecv(Pointer<UDPsocket> sock, Pointer<UDPpacket> packet) int
Receive a single packet from a UDP socket.
sdlNetUdpRecvV(Pointer<UDPsocket> sock, Pointer<Pointer<UDPpacket>> packets) int
Receive a vector of pending packets from a UDP socket.
sdlNetUdpSend(Pointer<UDPsocket> sock, int channel, Pointer<UDPpacket> packet) int
Send a single UDP packet to the specified channel.
sdlNetUdpSendV(Pointer<UDPsocket> sock, Pointer<Pointer<UDPpacket>> packets, int npackets) int
Send a vector of packets to the the channels specified within the packet.
sdlNetUdpSetPacketLoss(Pointer<UDPsocket> sock, int percent) → void
Set the percentage of simulated packet loss for packets sent on the socket.
sdlNetUdpUnbind(Pointer<UDPsocket> sock, int channel) → void
Unbind all addresses from the given channel.