프로퍼티 | 타입 | 설명 | |
---|---|---|---|
address | string | ||
connectionId | int | ||
hostId | int | ||
isReady | bool | ||
lastMessageTime | float | ||
logNetworkMessages | bool |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
AddOwnedObject | void | ||
AddToVisList | void | ||
CheckChannel | bool | ||
GetPlayerController | bool | ||
HandleFragment | void | ||
IsReliableQoS | bool | ||
IsSequencedQoS | bool | ||
LogSend | void | ||
OnFragment | void | ||
RemoveFromVisList | void | ||
RemoveObservers | void | ||
RemoveOwnedObject | void | ||
RemovePlayerController | void | ||
SetHandlers | void | ||
SetPlayerController | void |
메소드 | 설명 | |
---|---|---|
CheckHandler ( short msgType ) : bool |
This function checks if there is a message handler registered for the message ID.
|
|
Disconnect ( ) : void |
Disconnects this connection.
|
|
Dispose ( ) : void |
Disposes of this connection, releasing channel buffers that it holds.
|
|
FlushChannels ( ) : void |
This causes the channels of the network connection to flush their data to the transport layer.
|
|
GetStatsIn ( int &numMsgs, int &numBytes ) : void | ||
GetStatsOut ( int &numMsgs, int &numBufferedMsgs, int &numBytes, int &lastBufferedPerSecond ) : void | ||
Initialize ( string networkAddress, int networkHostId, int networkConnectionId, |
This inializes the internal data structures of a NetworkConnection object, including channel buffers.
|
|
InvokeHandler ( NetworkMessage netMsg ) : bool |
This function invokes the registered handler function for a message.
|
|
InvokeHandler ( short msgType, NetworkReader reader, int channelId ) : bool |
This function invokes the registered handler function for a message.
|
|
InvokeHandlerNoData ( short msgType ) : bool |
This function invokes the registered handler function for a message, without any message data.
|
|
RegisterHandler ( short msgType, NetworkMessageDelegate handler ) : void |
This registers a handler function for a message Id.
|
|
ResetStats ( ) : void |
Resets the statistics that are returned from NetworkClient.GetConnectionStats().
|
|
Send ( short msgType, |
This sends a network message with a message ID on the connection. This message is sent on channel zero, which by default is the reliable channel.
|
|
SendByChannel ( short msgType, |
This sends a network message on the connection using a specific transport layer channel.
|
|
SendBytes ( byte bytes, int numBytes, int channelId ) : bool |
This sends an array of bytes on the connection.
|
|
SendUnreliable ( short msgType, |
This sends a network message with a message ID on the connection. This message is sent on channel one, which by default is the unreliable channel.
|
|
SendWriter ( |
This sends the contents of a NetworkWriter object on the connection.
|
|
SetChannelOption ( int channelId, ChannelOption option, int value ) : bool |
This sets an option on the network channel.
|
|
SetMaxDelay ( float seconds ) : void |
The maximum time in seconds that messages are buffered before being sent.
|
|
ToString ( ) : string |
Returns a string representation of the NetworkConnection object state.
|
|
TransportRecieve ( byte bytes, int numBytes, int channelId ) : void |
This virtual function allows custom network connection classes to process data from the network before it is passed to the application.
|
|
TransportSend ( byte bytes, int numBytes, int channelId, byte &error ) : bool | ||
UnregisterHandler ( short msgType ) : void |
This removes the handler registered for a message Id.
|
메소드 | 설명 | |
---|---|---|
Dispose ( bool disposing ) : void | ||
HandleBytes ( byte buffer, int receivedSize, int channelId ) : void |
This makes the connection process the data contained in the buffer, and call handler functions.
|
|
HandleReader ( NetworkReader reader, int receivedSize, int channelId ) : void |
This makes the connection process the data contained in the stream, and call handler functions.
|
메소드 | 설명 | |
---|---|---|
AddOwnedObject ( |
||
AddToVisList ( |
||
CheckChannel ( int channelId ) : bool | ||
GetPlayerController ( short playerControllerId, |
||
HandleFragment ( NetworkReader reader, int channelId ) : void | ||
IsReliableQoS ( QosType qos ) : bool | ||
IsSequencedQoS ( QosType qos ) : bool | ||
LogSend ( byte bytes ) : void | ||
OnFragment ( NetworkMessage netMsg ) : void | ||
RemoveFromVisList ( |
||
RemoveObservers ( ) : void | ||
RemoveOwnedObject ( |
||
RemovePlayerController ( short playerControllerId ) : void | ||
SetHandlers ( |
||
SetPlayerController ( |
public CheckHandler ( short msgType ) : bool | ||
msgType | short | The message ID of the handler to look for. |
리턴 | bool |
public GetStatsIn ( int &numMsgs, int &numBytes ) : void | ||
numMsgs | int | |
numBytes | int | |
리턴 | void |
public GetStatsOut ( int &numMsgs, int &numBufferedMsgs, int &numBytes, int &lastBufferedPerSecond ) : void | ||
numMsgs | int | |
numBufferedMsgs | int | |
numBytes | int | |
lastBufferedPerSecond | int | |
리턴 | void |
protected HandleBytes ( byte buffer, int receivedSize, int channelId ) : void | ||
buffer | byte | Data to process. |
receivedSize | int | Size of the data to process. |
channelId | int | Channel the data was recieved on. |
리턴 | void |
protected HandleReader ( NetworkReader reader, int receivedSize, int channelId ) : void | ||
reader | NetworkReader | Stream that contains data. |
receivedSize | int | Size of the data. |
channelId | int | Channel the data was received on. |
리턴 | void |
public Initialize ( string networkAddress, int networkHostId, int networkConnectionId, |
||
networkAddress | string | The host or IP connected to. |
networkHostId | int | The transport hostId for the connection. |
networkConnectionId | int | The transport connectionId for the connection. |
hostTopology | The topology to be used. | |
리턴 | void |
public InvokeHandler ( NetworkMessage netMsg ) : bool | ||
netMsg | NetworkMessage | The message object to process. |
리턴 | bool |
public InvokeHandler ( short msgType, NetworkReader reader, int channelId ) : bool | ||
msgType | short | The message type of the handler to use. |
reader | NetworkReader | The stream to read the contents of the message from. |
channelId | int | The channel that the message arrived on. |
리턴 | bool |
public InvokeHandlerNoData ( short msgType ) : bool | ||
msgType | short | The message ID of the handler to invoke. |
리턴 | bool |
public RegisterHandler ( short msgType, NetworkMessageDelegate handler ) : void | ||
msgType | short | The message ID to register. |
handler | NetworkMessageDelegate | The handler function to register. |
리턴 | void |
public Send ( short msgType, |
||
msgType | short | The ID of the message to send. |
msg | The message to send. | |
리턴 | bool |
public SendByChannel ( short msgType, |
||
msgType | short | The message ID to send. |
msg | The message to send. | |
channelId | int | The transport layer channel to send on. |
리턴 | bool |
public SendBytes ( byte bytes, int numBytes, int channelId ) : bool | ||
bytes | byte | The array of data to be sent. |
numBytes | int | The number of bytes in the array to be sent. |
channelId | int | The transport channel to send on. |
리턴 | bool |
public SendUnreliable ( short msgType, |
||
msgType | short | The message ID to send. |
msg | The message to send. | |
리턴 | bool |
public SendWriter ( |
||
writer | A writer object containing data to send. | |
channelId | int | The transport channel to send on. |
리턴 | bool |
public SetChannelOption ( int channelId, ChannelOption option, int value ) : bool | ||
channelId | int | The channel the option will be set on. |
option | ChannelOption | The option to set. |
value | int | The value for the option. |
리턴 | bool |
public SetMaxDelay ( float seconds ) : void | ||
seconds | float | Time in seconds. |
리턴 | void |
public TransportRecieve ( byte bytes, int numBytes, int channelId ) : void | ||
bytes | byte | The data recieved. |
numBytes | int | The size of the data recieved. |
channelId | int | The channel that the data was received on. |
리턴 | void |
public TransportSend ( byte bytes, int numBytes, int channelId, byte &error ) : bool | ||
bytes | byte | |
numBytes | int | |
channelId | int | |
error | byte | |
리턴 | bool |
public UnregisterHandler ( short msgType ) : void | ||
msgType | short | The message ID to unregister. |
리턴 | void |