index of namespace default
 
 index of project tksdl_net
 
 index of module tksdl_net

Class tksdl_net.Network


SynopsisStatic wrapper class for the SDL_net networking functions.

  Base classes:
  Methods:
  Constants:

Method addSocket
Add TCP/UDP socket to (internal) socket set
Signature
addSocket(Objectsocket)
Arguments
Objectsocket
Description

This is a wrapper for the SDLNet_TCP_AddSocket() native function.

 
 top of page
Method addTCPSocket
Add TCP socket to (internal) socket set
Signature
addTCPSocket(TCPSocketsocket)
Arguments
TCPSocketsocket
Description

This is a wrapper for the SDLNet_TCP_AddSocket() native function.

 
 top of page
Method addUDPSocket
Add UDP socket to (internal) socket set
Signature
addUDPSocket(UDPSocketsocket)
Arguments
UDPSocketsocket
Description

TODO: implementation missing

 
 top of page
Method allocSocketSet
Create a socket set that will be able to watch up to a given amount of sockets.
Signature
allocSocketSet(intnum)
 :boolean
Arguments
intnum
Returns
boolean
Description

This is a wrapper function for the SDLNet_AllocSocketSet() native function.
The resulting SDLNet_SocketSet will be stored internally.

 
 top of page
Method checkSockets
Check all sockets in the (internal) socket set for activity.
Signature
checkSockets(inttimeoutMilliSec)
Arguments
inttimeoutMilliSec
Description

This is a wrapper for the SDLNet_CheckSockets() native function.

 
 top of page
Method freeSocketSet
Free (internal) socket set
Signature
freeSocketSet()

 
 top of page
Method getError
Return last error String.
Signature
getError():String
Returns
String
Description

This is a wrapper for the SDLNet_GetError() native function.

 
 top of page
Method removeSocket
Remove TCP or UDP socket from (internal) socket set
Signature
removeSocket(Objectsocket)
Arguments
Objectsocket
Description

This is a wrapper for the SDLNet_TCP_DelSocket() native function.

 
 top of page
Method resolveHost
Resolve hostname and port and return IPAddress object
Signature
resolveHost(Stringname,
  intport 
  )  
 :IPAddress
Arguments
Stringname
intport
Returns
IPAddressnull if DNS lookup failed, IPAddress object otherwise
Description

This is a wrapper function for the SDLNet_ResolveHost() native function.

 
 top of page
Method resolveIP
Reverse DNS lookup, return hostname for IPV4 address
Signature
resolveIP(IPAddressaddr)
 :String
Arguments
IPAddressaddr
Returns
String
Description

This is a wrapper function for the SDLNet_ResolveIP() native function.

 
 top of page
Constant INADDR_ANY (int)
Constant INADDR_NONE (int)

 

Project Modules:tksdl_net 
Project Classes:IPAddress , Network , TCPSocket , UDPPacket , UDPSocket 
Project Functions:
All Namespaces:default , graph , ui 
All Projects:core , eqxmms , ShaderVG , ShaderVG_Text , tkanalogrytm , tkchipmunk , tkclap , tkfileutils , tkfreeglut , tkfreetype2 , tkfreeverb , tkmath , tkmidi , tkmidipipe , tkminnie , tkoldmath , tkopengl , tkportaudio , tkradiastools , tksamplechain , tksampleedit , tksampler , tksdl , tksdl_net , tksidplay2 , tkspeexdsp , tksqlite , tktriangulate , tkui , tkvst2 , tkzip , ui , yingtest 


auto-generated by "DOG", the TkScript document generator. Thu, 11/Dec/2025 13:42:00