For the full API, please Read:
http://jcatki.no-ip.org:8080/SDL_net/
SDL_net Reference
- General
SDLNet_Init - Start up SDL_net functionality
SDLNet_Quit - Stop SDL_net functionality
SDLNet_GetError - Get the current error string
SDLNet_Write16 - Put a 16bit number in network ordered data
SDLNet_Write32 - Put a 32bit number in network ordered data
SDLNet_Read16 - Get a 16bit number from network ordered data
SDLNet_Read32 - Get a 32bit number from network ordered data
SDLNet_ResolveHost - Get an IPaddress from hostname
SDLNet_ResolveIP - Get hostname from an IPaddress
SDLNet_TCP_Open - Open a TCP client or server socket
SDLNet_TCP_Close - Close a TCP socket
SDLNet_TCP_Accept - Accept a connection on a server socket
SDLNet_TCP_GetPeerAddress - Get the remote host address and port number
SDLNet_TCP_Send - Send data over a connected socket
SDLNet_TCP_Recv - Receive data from a connected socket
- UDP Sockets
SDLNet_UDP_Open - Create a UDP socket
SDLNet_UDP_Close - Close and free a UDP socket
SDLNet_UDP_Bind - Assign an IP address number to a socket channel
SDLNet_UDP_Unbind - Remove all assigned IP addresses from a socket channel
SDLNet_UDP_GetPeerAddress - Get the assigned IP address for a socket channel or get the port you opened the socket with
SDLNet_UDP_Send - Send a UDPpacket
SDLNet_UDP_Recv - Receive into a UDPpacket
SDLNet_UDP_SendV - Send a UDPpacket vector
SDLNet_UDP_RecvV - Receive into a UDPpacket vector
- UDP Packets
SDLNet_AllocPacket - Allocate a new UDP packet with a data buffer
SDLNet_ResizePacket - Resize the data buffer in a UDPpacket
SDLNet_FreePacket - Free a previously allocated UDPpacket
SDLNet_AllocPacketV - Allocate a vector of UDPpackets
SDLNet_FreePacketV - Free a vector of UDPpackets
- Socket Sets
SDLNet_AllocSocketSet - Create a new socket set
SDLNet_FreeSocketSet - Free a socket set
SDLNet_AddSocket - Add a socket to a socket set
SDLNet_DelSocket - Remove a socket from a socket set
SDLNet_CheckSockets - Check and wait for sockets in a set to have activity
SDLNet_SocketReady - See if a socket has activity
- Types
IPaddress - IP Address and Port number
TCPsocket - TCP socket type (opaque)
UDPsocket - UDP socket type (opaque)
UDPpacket - UDP packet data encapsulation
SDLNet_SocketSet - Socket Set type (opaque)
SDLNet_GenericSocket - A generic type for UDP and TCP sockets
- Defines
INADDR_ANY - used for listening on all network interfaces.
INADDR_NONE - which has limited applications.
INADDR_BROADCAST - used when sending a message to all clients on a subnet.
SDLNET_MAX_UDPCHANNELS - max channels on a UDP socket.
SDLNET_MAX_UDPADDRESSES - max addresses bound to a UDP socket channel.
