Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
$#!
 _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
function M:_onNewClient(msg,
ip,
port)
Callback called when new client connection is detected.
function M:_onNewMessage(msg,
sock,
ip,
port)
Called when new packed arrives on connected socket.
function M:_onTimeout()
Called when no packet is received in some amount of time.
function M:_setPeer(sock,
rip,
rport)
Sets the peer for the socket, makes socket connected.
Starts listening for UDP packets
function M:_unsetPeer(sock)
Unsets the peer for the socket, makes socket unconnected.
function M:close(skt)
Close the connection.
function M:connect(host,
port,
timeout)
Connects as a client to the server.
Creates new UDPIPE instance.
function M:getReceivedPackets()
Returns the number of packets received.
function M:getSentPackets()
Returns the number of packets sent out.
function M:onBadToken(msg,
ip,
port)
Called when bad token is received in HELLO packet.
function M:onClose(sock)
Called when client or server closed the connection.
function M:onConnect(sock,
ip,
port)
Called when client connected to the Server, or a new client has connected.
function M:onConnecting(sock,
ip,
port)
Called when client is connecting to the Server on a final port.
function M:onDisconnect(sock)
Called when a socket is disconnected.
function M:onMaxClients(msg,
ip,
port)
Called when too much client connections is open.
function M:onNewClient(msg,
ip,
port,
ipc,
portc)
Called when new client is connected.
function M:onNewMessage(msg,
sock)
Called when new message arrives.
function M:onPing(sock)
Called when PING packet is received.
function M:onPong(sock)
Called when PONG packet is received.
function M:onStalled(sock)
Called when the connection lags.
function M:onUnstalled(sock)
Connection is no longer stalled.
function M:ping(sock)
Sends a ping message to server (in client mode) or all connected sockets (in server mode).
function M:send(msg,
sock)
Sends a message to a connected socket.
function M:sendAll(msg)
Sends a message to all connected sockets (clients).
function M:setDebug(d)
Sets the debugging.
function M:setTimeout(t)
Sets the timeout for all current and newly opened sockets.
function M:setToken(t)
Sets the token for handshaking.
function M:start(port,
host,
timeout)
Starts the server.
function M:step(dt)
Keeps the client/server running.
Close