com.onlineobject.objectnet Namespace

NetworkTransport Methods

The NetworkTransport type exposes the following members.

Methods


  Name Description
Public method Configure
Configures the socket with the provided IP address, TCP port, UDP port, and idle timeout.
Public method Connect
Establishes a connection with the socket if it is not already started or connected. If the direction is set to Server and the onServerStarted event is not null, it invokes the event.
Public method Disconnect
Disconnects the socket if it is started or connected.
Public method GetConnectionType
Retrieves the connection type of the socket.
Public method GetPingAverage
Get the average ping time for the network manager.
Public method GetSocket
Gets the network socket associated with this instance.
Public method IsConnected
Checks if the network socket is connected.
Public method OnClientConnected
Sets the action to be invoked when a client is connected to the server.
Public method OnClientDisconnected
Sets the action to be invoked when a client is disconnected from the server.
Public method OnConnected
Sets the action to be invoked when a client is connected.
Public method OnConnectedRelayServer
Sets the action to be invoked when a client is connected to the relay server.
Public method OnConnectionFailed
Sets the action to be invoked when a connection attempt fails.
Public method OnDisconnected
Sets the action to be invoked when a client is disconnected.
Public method OnLoginFailed
Sets the action to be invoked when a login attempt fails.
Public method OnLoginSucess
Sets the action to be invoked when a login attempt is successful.
Public method OnServerRestarted
Sets the action to be invoked when a server restart was detected by client.
Public method OnServerStarted
Sets the action to be invoked when the server is started.
Public method RegisterAwake
Register a callback method to be invoked when the network manager awakes.
Public method Send
Send a method for global listener. This event will be caught by the network manager and handled globally.
Public method SetAutoConnect
Set whether the network manager should automatically connect.
Public method SetConnectionType
Set the connection type for the network manager.
Public method SetIdleTimeout
Sets the idle timeout for the socket.
Public method SetIp
Sets the IP address for the socket.
Public method SetLatencyMeasure
Enable or disable latency measurement for the network manager.
Public method SetTcpPort
Sets the TCP port for the socket.
Public method SetUdpPort
Sets the UDP port for the socket.
Public method UnRegisterAwake
Unregister a callback method from being invoked when the network manager awakes.
Public method Update
Update is called every frame, if the MonoBehaviour is enabled. It processes network socket operations and sends pings if necessary.