Mirror Networking
|
Abstract transport layer component More...
Public Member Functions | |
abstract bool | Available () |
Is this transport available in the current platform? | |
abstract bool | ClientConnected () |
True if the client is currently connected to the server. | |
abstract void | ClientConnect (string address) |
Connects the client to the server at the address. | |
virtual void | ClientConnect (Uri uri) |
Connects the client to the server at the Uri. More... | |
abstract void | ClientSend (ArraySegment< byte > segment, int channelId=Channels.Reliable) |
Sends a message to the server over the given channel. | |
abstract void | ClientDisconnect () |
Disconnects the client from the server | |
abstract Uri | ServerUri () |
Returns server address as Uri. | |
abstract bool | ServerActive () |
True if the server is currently listening for connections. | |
abstract void | ServerStart () |
Start listening for connections. | |
abstract void | ServerSend (int connectionId, ArraySegment< byte > segment, int channelId=Channels.Reliable) |
Send a message to a client over the given channel. | |
abstract void | ServerDisconnect (int connectionId) |
Disconnect a client from the server. | |
abstract string | ServerGetClientAddress (int connectionId) |
Get a client's address on the server. | |
abstract void | ServerStop () |
Stop listening and disconnect all connections. | |
abstract int | GetMaxPacketSize (int channelId=Channels.Reliable) |
Maximum message size for the given channel. | |
virtual int | GetBatchThreshold (int channelId=Channels.Reliable) |
Recommended Batching threshold for this transport. More... | |
void | Update () |
void | LateUpdate () |
virtual void | ClientEarlyUpdate () |
NetworkLoop NetworkEarly/LateUpdate were added for a proper network update order. the goal is to: process_incoming() update_world() process_outgoing() in order to avoid unnecessary latency and data races. More... | |
virtual void | ServerEarlyUpdate () |
virtual void | ClientLateUpdate () |
virtual void | ServerLateUpdate () |
abstract void | Shutdown () |
Shut down the transport, both as client and server | |
virtual void | OnApplicationQuit () |
Called by Unity when quitting. Inheriting Transports should call base for proper Shutdown. More... | |
Public Attributes | |
Action | OnClientConnected |
Called by Transport when the client connected to the server. More... | |
Action< ArraySegment< byte >, int > | OnClientDataReceived |
Called by Transport when the client received a message from the server. More... | |
Action< ArraySegment< byte >, int > | OnClientDataSent |
Called by Transport when the client sent a message to the server. More... | |
Action< TransportError, string > | OnClientError |
Called by Transport when the client encountered an error. More... | |
Action | OnClientDisconnected |
Called by Transport when the client disconnected from the server. More... | |
Action< int > | OnServerConnected |
Called by Transport when a new client connected to the server. More... | |
Action< int, ArraySegment< byte >, int > | OnServerDataReceived |
Called by Transport when the server received a message from a client. More... | |
Action< int, ArraySegment< byte >, int > | OnServerDataSent |
Called by Transport when the server sent a message to a client. More... | |
Action< int, TransportError, string > | OnServerError |
Called by Transport when a server's connection encountered a problem. More... | |
Action< int > | OnServerDisconnected |
Called by Transport when a client disconnected from the server. More... | |
Static Public Attributes | |
static Transport | activeTransport |
The current transport used by Mirror. More... | |
Abstract transport layer component
Definition at line 31 of file Transport.cs.
|
virtual |
Connects the client to the server at the Uri.
Definition at line 89 of file Transport.cs.
|
virtual |
NetworkLoop NetworkEarly/LateUpdate were added for a proper network update order. the goal is to: process_incoming() update_world() process_outgoing() in order to avoid unnecessary latency and data races.
Definition at line 174 of file Transport.cs.
|
virtual |
Definition at line 176 of file Transport.cs.
|
virtual |
Recommended Batching threshold for this transport.
Definition at line 140 of file Transport.cs.
void Mirror.Transport.LateUpdate | ( | ) |
Definition at line 159 of file Transport.cs.
|
virtual |
Called by Unity when quitting. Inheriting Transports should call base for proper Shutdown.
Definition at line 183 of file Transport.cs.
|
virtual |
Definition at line 175 of file Transport.cs.
|
virtual |
Definition at line 177 of file Transport.cs.
void Mirror.Transport.Update | ( | ) |
Definition at line 158 of file Transport.cs.
|
static |
The current transport used by Mirror.
Definition at line 35 of file Transport.cs.
Action Mirror.Transport.OnClientConnected |
Called by Transport when the client connected to the server.
Definition at line 42 of file Transport.cs.
Action<ArraySegment<byte>, int> Mirror.Transport.OnClientDataReceived |
Called by Transport when the client received a message from the server.
Definition at line 45 of file Transport.cs.
Action<ArraySegment<byte>, int> Mirror.Transport.OnClientDataSent |
Called by Transport when the client sent a message to the server.
Definition at line 52 of file Transport.cs.
Action Mirror.Transport.OnClientDisconnected |
Called by Transport when the client disconnected from the server.
Definition at line 58 of file Transport.cs.
Action<TransportError, string> Mirror.Transport.OnClientError |
Called by Transport when the client encountered an error.
Definition at line 55 of file Transport.cs.
Action<int> Mirror.Transport.OnServerConnected |
Called by Transport when a new client connected to the server.
Definition at line 62 of file Transport.cs.
Action<int, ArraySegment<byte>, int> Mirror.Transport.OnServerDataReceived |
Called by Transport when the server received a message from a client.
Definition at line 65 of file Transport.cs.
Action<int, ArraySegment<byte>, int> Mirror.Transport.OnServerDataSent |
Called by Transport when the server sent a message to a client.
Definition at line 72 of file Transport.cs.
Action<int> Mirror.Transport.OnServerDisconnected |
Called by Transport when a client disconnected from the server.
Definition at line 79 of file Transport.cs.
Action<int, TransportError, string> Mirror.Transport.OnServerError |
Called by Transport when a server's connection encountered a problem.
If a Disconnect will also be raised, raise the Error first.
Definition at line 76 of file Transport.cs.