Mirror Networking
Mirror.NetworkConnectionToServer Class Reference
Inheritance diagram for Mirror.NetworkConnectionToServer:
Mirror.NetworkConnection Mirror.LocalConnectionToServer

Public Member Functions

override void Disconnect ()
 Disconnects this connection. More...
 
- Public Member Functions inherited from Mirror.NetworkConnection
void Send< T > (T message, int channelId=Channels.Reliable)
 Send a NetworkMessage to this connection over the given channel. More...
 
abstract void Disconnect ()
 Disconnects this connection. More...
 
override string ToString ()
 

Protected Member Functions

override void SendToTransport (ArraySegment< byte > segment, int channelId=Channels.Reliable)
 
- Protected Member Functions inherited from Mirror.NetworkConnection
Batcher GetBatchForChannelId (int channelId)
 
abstract void SendToTransport (ArraySegment< byte > segment, int channelId=Channels.Reliable)
 

Properties

override string address [get]
 
- Properties inherited from Mirror.NetworkConnection
HashSet< NetworkIdentityobserving [get]
 NetworkIdentities that this connection can see More...
 
abstract string address [get]
 IP address of the connection. Can be useful for game master IP bans etc. More...
 
NetworkIdentity identity [get, set]
 This connection's main object (usually the player object). More...
 
HashSet< NetworkIdentityclientOwnedObjects [get]
 All NetworkIdentities owned by this connection. Can be main player, pets, etc. More...
 
double remoteTimeStamp [get, set]
 last batch's remote timestamp. not interpolated. useful for NetworkTransform etc. More...
 

Additional Inherited Members

- Public Attributes inherited from Mirror.NetworkConnection
readonly int connectionId
 Unique identifier for this connection that is assigned by the transport layer. More...
 
bool isAuthenticated
 Flag that indicates the client has been authenticated. More...
 
object authenticationData
 General purpose object to hold authentication data, character selection, tokens, etc. More...
 
bool isReady
 A server connection is ready after joining the game world. More...
 
float lastMessageTime
 Last time a message was received for this connection. Includes system and user messages. More...
 
- Static Public Attributes inherited from Mirror.NetworkConnection
const int LocalConnectionId = 0
 
- Static Protected Member Functions inherited from Mirror.NetworkConnection
static bool ValidatePacketSize (ArraySegment< byte > segment, int channelId)
 
- Protected Attributes inherited from Mirror.NetworkConnection
Dictionary< int, Batcherbatches = new Dictionary<int, Batcher>()
 

Detailed Description

Definition at line 6 of file NetworkConnectionToServer.cs.

Member Function Documentation

◆ Disconnect()

override void Mirror.NetworkConnectionToServer.Disconnect ( )
virtual

Disconnects this connection.

Implements Mirror.NetworkConnection.

Definition at line 16 of file NetworkConnectionToServer.cs.

17 {
18 // set not ready and handle clientscene disconnect in any case
19 // (might be client or host mode here)
20 // TODO remove redundant state. have one source of truth for .ready!
21 isReady = false;
22 NetworkClient.ready = false;
23 Transport.activeTransport.ClientDisconnect();
24 }
bool isReady
A server connection is ready after joining the game world.

◆ SendToTransport()

override void Mirror.NetworkConnectionToServer.SendToTransport ( ArraySegment< byte >  segment,
int  channelId = Channels.Reliable 
)
protectedvirtual

Property Documentation

◆ address

override string Mirror.NetworkConnectionToServer.address
get

Definition at line 8 of file NetworkConnectionToServer.cs.