$#! | |
_onNewClient, UDPIPE | |
_onNewMessage, UDPIPE | |
_onTimeout, UDPIPE | |
_setPeer, UDPIPE | |
_startUdp, UDPIPE | |
_unsetPeer, UDPIPE | |
C | |
close, UDPIPE | |
connect, UDPIPE | |
constructor, UDPIPE | |
G | |
getReceivedPackets, UDPIPE | |
getSentPackets, UDPIPE | |
O | |
onBadToken, UDPIPE | |
onClose, UDPIPE | |
onConnect, UDPIPE | |
onConnecting, UDPIPE | |
onDisconnect, UDPIPE | |
onMaxClients, UDPIPE | |
onNewClient, UDPIPE | |
onNewMessage, UDPIPE | |
onPing, UDPIPE | |
onPong, UDPIPE | |
onStalled, UDPIPE | |
onUnstalled, UDPIPE | |
P | |
ping, UDPIPE | |
S | |
send, UDPIPE | |
sendAll, UDPIPE | |
setDebug, UDPIPE | |
setTimeout, UDPIPE | |
setToken, UDPIPE | |
start, UDPIPE | |
step, UDPIPE |
Callback called when new client connection is detected.
function M:_onNewClient( msg, ip, port )
Called when new packed arrives on connected socket.
function M:_onNewMessage( msg, sock, ip, port )
Called when no packet is received in some amount of time.
function M:_onTimeout()
Sets the peer for the socket, makes socket connected.
function M:_setPeer( sock, rip, rport )
Unsets the peer for the socket, makes socket unconnected.
function M:_unsetPeer( sock )
Close the connection.
function M:close( skt )
Connects as a client to the server.
function M:connect( host, port, timeout )
Returns the number of packets received.
function M:getReceivedPackets()
Returns the number of packets sent out.
function M:getSentPackets()
Called when bad token is received in HELLO packet.
function M:onBadToken( msg, ip, port )
Called when client or server closed the connection.
function M:onClose( sock )
Called when client connected to the Server, or a new client has connected.
function M:onConnect( sock, ip, port )
Called when client is connecting to the Server on a final port.
function M:onConnecting( sock, ip, port )
Called when a socket is disconnected.
function M:onDisconnect( sock )
Called when too much client connections is open.
function M:onMaxClients( msg, ip, port )
Called when new client is connected.
function M:onNewClient( msg, ip, port, ipc, portc )
Called when new message arrives.
function M:onNewMessage( msg, sock )
Called when PING packet is received.
function M:onPing( sock )
Called when PONG packet is received.
function M:onPong( sock )
Called when the connection lags.
function M:onStalled( sock )
Connection is no longer stalled.
function M:onUnstalled( sock )
Sends a ping message to server (in client mode) or all connected sockets (in server mode).
function M:ping( sock )
Sends a message to a connected socket.
function M:send( msg, sock )
Sends a message to all connected sockets (clients).
function M:sendAll( msg )
Sets the debugging.
function M:setDebug( d )
Sets the timeout for all current and newly opened sockets.
function M:setTimeout( t )
Sets the token for handshaking.
function M:setToken( t )
Starts the server.
function M:start( port, host, timeout )
Keeps the client/server running.
function M:step( dt )