Networking
(NOTE) Manages all the client/server/peer connections .
Methods | Properties | Base Classes | Derived Classes |
---|---|---|---|
Close | ConnectionCount | eventobject | |
CloseConnection | IncomingConnectionCount | ||
Connect | OutgoingConnectionCount | ||
IsConnected | |||
Listen | |||
SendTo | |||
SendToAll | |||
SendToAllAndSelf | |||
SendToAllExcept |
Properties
ConnectionCount : integer
read-only
Get the number of connections we have.
var ConnectionCount : Integer
IncomingConnectionCount : integer
read-only
Get the number of incoming connections.
var IncomingConnectionCount : Integer
OutgoingConnectionCount : integer
read-only
Get the number of outgoing connections.
var OutgoingConnectionCount : Integer
Methods
Close : Void
Close all activity (whether listening or connected to a server). |Name|Type|Description| |---|---|---|
function Close()
CloseConnection : Void
Name Type Description index integer function CloseConnection(index : Integer)
Connect : Void
Attempt to connect to a host on the given port. |Name|Type|Description| |---|---|---| |host|string| | |port|integer| |
function Connect(host : String, port : Integer)
IsConnected : boolean
Check if we are currently connected to anyone. |Name|Type|Description| |---|---|---|
function IsConnected() : Boolean
Listen : boolean
Listen for incoming connections. |Name|Type|Description| |---|---|---| |port|integer| | |maxConnections|integer| |
function Listen(port : Integer, maxConnections : Integer) : Boolean
Listen : boolean
Listen for incoming connections. |Name|Type|Description| |---|---|---| |port|integer| | |maxConnections|integer| | |bindTo|TcpSocketBind| |
function Listen(port : Integer, maxConnections : Integer, bindTo : TcpSocketBind) : Boolean
SendTo : Void
Send an event to a specific connection index. |Name|Type|Description| |---|---|---| |eventId|string| | |event|sendableevent| | |index|integer| |
function SendTo(eventId : String, event : SendableEvent, index : Integer)
SendToAll : Void
Send an event to all connections. |Name|Type|Description| |---|---|---| |eventId|string| | |event|sendableevent| |
function SendToAll(eventId : String, event : SendableEvent)
SendToAllAndSelf : Void
Send an event to all connections and dispatch on self. |Name|Type|Description| |---|---|---| |eventId|string| | |event|sendableevent| |
function SendToAllAndSelf(eventId : String, event : SendableEvent)
SendToAllExcept : Void
Send an event to all connections except a particular connection index. |Name|Type|Description| |---|---|---| |eventId|string| | |event|sendableevent| | |exceptIndex|integer| |
function SendToAllExcept(eventId : String, event : SendableEvent, exceptIndex : Integer)