ipsocket package

ipsocket contains no utilities.

License

The ipsocket package is marked as Compatible, which means any game can use it.

Classes

TCPSocket : SocketStream

A SocketStream based on TCP/IPv4.

TCPSocket has no methods it didn't inherit.

socket = SubCritical.Construct("TCPSocket") socket:SetAddressPart("Host", host) socket:SetAddressPart("Port", port) -- normally, you want to handle an error here more gracefully assert(socket:ApplyAddress())

TCPListenSocket : ListenSocketStream

A ListenSocketStream based on TCP/IPv4.

TCPListenSocket has no methods it didn't inherit.

listen = SubCritical.Construct("TCPListenSocket") listen:SetAddressPart("Host", "*") -- * -> INADDR_ANY listen:SetAddressPart("Port", port) -- normally, you want to handle an error here more gracefully assert(listen:ApplyAddress())

UDPSocket : SocketDgram

A SocketDgram based on UDP/IPv4.

UDPSocket has no methods it didn't inherit.

socket = SubCritical.Construct("UDPSocket") socket:SetAddressPart("Host", host) socket:SetAddressPart("Port", port) -- normally, you want to handle an error here more gracefully assert(socket:ApplyAddress())

UDPListenSocket : ListenSocketDgram

A ListenSocketDgram based on UDP/IPv4.

UDPListenSocket has no methods it didn't inherit.

listen = SubCritical.Construct("UDPListenSocket") listen:SetAddressPart("Host", "*") -- * -> INADDR_ANY listen:SetAddressPart("Port", port) -- normally, you want to handle an error here more gracefully assert(listen:ApplyAddress())

Back to index