AddHost | Will create host (open socket) with given topology and port. |
AddHostWithSimulator | Will create host (open socket) and configure them to simulate internet latency (works on editor and development build only). |
AddWebsocketHost | Created web socket host.
This function is supported only for Editor (Win, Linux, Mac) and StandalonePlayers (Win, Linux, Mac)
Topology is used to define how many client can connect, and how many messages should be preallocated in send and receive pool, all other parameters are ignored. |
Connect | Try to establish connection to other peer. |
ConnectAsNetworkHost | Create dedicated connection to relay server. |
ConnectEndPoint | Try to establish connection to other peer, where the peer is specified using a C# System.EndPoint. |
ConnectToNetworkPeer | Create connection to other peer in the relay group. |
ConnectWithSimulator | Connect with simulated latency. |
Disconnect | Send disconnect signal to peer and close connection. user should call Receive() to be notified that connection is closed. This signal will send only once (best effort delivery) iif this packet will dropped by some reason, peer will close connection by timeout. |
DisconnectNetworkHost | Aplyed only for client which has been already owner of the same group of relay server. it will disconnect this owner from the group, group will be distracted or (if it supported) one of the member of this group should became new owner (owner migration). |
FinishSendMulticast | Function will finalize sending message to group of connection. (only one multicast message per time is allowed for host). |
GetAssetId | The UNet spawning system uses assetIds to identify how spawn remote objects. This function allows you to get the assetId for the prefab associated with an object. |
GetBroadcastConnectionInfo | If Receive() function returns BroadcastEvent, immedeately this function will return connection info of broadcast sender. This info can be used for connection to broadcast sender. |
GetBroadcastConnectionMessage | If Receive() function returns BroadcastEvent, immedeately this function will return complimentary message of broadcast sender. |
GetConnectionInfo | Return connection parameters of connected connection, this parameters can be sent to other user which can establish direct connection to this peer. If peer connected via relay, relay related parameters will be not invalid. |
GetCurrentIncomingMessageAmount | Return value of messages waiting for reading. |
GetCurrentOutgoingMessageAmount | Return total message amount waiting for sending. |
GetCurrentRtt | Return round trip time for connection. |
GetNetIOTimeuS | Function returns time spent on network io operations in micro seconds. |
GetNetworkTimestamp | Get UNET timestamp which can be added to message for further definitions of packet delaying. |
GetPacketReceivedRate | Return current receive rate in bytes per sec. |
GetPacketSentRate | Reurn outgoing rate in bytes per second. |
GetRemoteDelayTimeMS | Return time delay for timestamp received from message (previously created by GetNetworkTimestamp()). |
GetRemotePacketReceivedRate | Get received rate in bytes per second for remote peer, comparison with local send rate can give information how many bytes was lost. |
Init | First function which should be called before any other NetworkTransport function. |
IsBroadcastDiscoveryRunning | Check if broadcastdiscovery sender works. |
Receive | Delivered different network events to user. kConnectionEvent will notify about new connection established, kDisconnectEvent will report about disconnection happened, kDataEvent will report about new information delivered. Use must represent buffer for delivered data. |
ReceiveFromHost | Similar to Receive() but will ask only provided host. It for example allows to mix server/client in the same game. |
ReceiveRelayEventFromHost | Function delivered relay group event for group owner. |
RemoveHost | Close opened socket, close all connection belonging this socket. |
Send | Send data to peer. |
SendMulticast | Function adds another connection to multy peer sends. |
SetBroadcastCredentials | Set credentials for received broadcast message. If one of credentials is wrong, received brodcast discovery message will drop. |
SetPacketStat | Used to inform the profiler of network packet statistics. |
Shutdown | Shutdown the transport layer, after calling this function no any other function can be called. |
StartBroadcastDiscovery | Function starts send broadcasting message in all local subnets. |
StartSendMulticast | Start process sending message per group of connected connection. |
StopBroadcastDiscovery | Stop sending broadcast discovery message. |