Namespace Unity.Networking.Transport
Classes
BaselibNetworkParameterExtensions
CommonNetworkParametersExtensions
Extensions for Network
ManagedNetworkInterfaceExtensions
Extension methods to work with a managed INetwork
NetworkSimulatorParameterExtensions
Extensions for Network
WebSocketParameterExtensions
Extensions for Web
Structs
BaselibNetworkInterface
Obsolete. Use UDPNetwork
BaselibNetworkParameter
Obsolete. Set the receive/send queue capacities with Network
FragmentationPipelineStage
Pipeline stage that can be used to fragment large packets into MTU-sized chunks. Use this stage when defining pipelines that need to send packets larger than ~1400 bytes.
IPCNetworkInterface
The IPC network interface implements the functionality of a network interface over an
in-memory buffer. Operations will be instantaneous, but can only be used to communicate with
other Network
Note that the interface expects loopback addresses when binding/connecting. It is
recommended to only use Loopback
InboundRecvBuffer
Buffer passed to the Receive
method of a pipeline stage. This type is only useful if
implementing a custom INetwork
InboundSendBuffer
Buffer passed to the Send
method of a pipeline stage. This type is only useful if
implementing a custom INetwork
MultiNetworkDriver
The MultiNetworkDriver
structure is a way to manipulate multiple instances of
Network
MultiNetworkDriver.Concurrent
Structure that can be used to access a MultiNetworkDriver
from multiple jobs.
Only a subset of operations are supported because not all operations are safe to perform
concurrently. Must be obtained with the To
NetworkConfigParameter
Configuration structure for a Network
NetworkConnection
Public representation of a connection. This is obtained by calling
Accept(out Native
NetworkDriver
The NetworkDriver
is the main API with which users interact with the Unity Transport
package. It can be thought of as a socket with extra features. Refer to the manual for
examples of how to use this API.
NetworkDriver.Concurrent
Structure that can be used to access a NetworkDriver
from multiple jobs. Only a
subset of operations are supported because not all operations are safe to perform
concurrently. Must be obtained with the To
NetworkEndpoint
Representation of an endpoint on the network. Typically, this means an IP address and a port
number, and the API provides means to make working with this kind of endpoint easier.
Analoguous to a sockaddr
structure in traditional BSD sockets.
NetworkEvent
NetworkInterfaceEndPoint
Obsolete. Part of the old INetworkInterface
API.
NetworkInterfaceUnmanagedWrapper<T>
An unmanaged network interface that can act as a wrapper for a managed one. Use
Wrap
NetworkPacketReceiver
Obsolete. Part of the old INetworkInterface
API.
NetworkParameterConstants
Default values used for the different network parameters. These parameters (except the MTU)
can be set with With
NetworkPipeline
Identifier for a network pipeline obtained with Create
NetworkPipelineContext
Current context of a pipeline stage instance. This type is only useful if implementing a
custom INetwork
NetworkPipelineStage
Concrete implementation details of a pipeline stage. Only used if implementing custom
pipeline stages. Implementors of INetwork
NetworkPipelineStageId
Identifier for a pipeline stage.
NetworkSettings
An aggregate of the different parameter structures that describe a network configuration.
NetworkSimulatorParameter
Parameters for the global network simulator.
NullPipelineStage
A pipeline stage that does nothing. This can be useful to create different "channels" of communication for different types of messages, even when these messages do not otherwise require any other guarantees provided by other pipeline stages.
OperationResult
Stores the result of a network operation. This is normally used when a job needs to return
a result to its caller. For example the Receive
PacketProcessor
An API representing a packet acquired from a Packets
PacketsQueue
A queue of packets with an internal pool of preallocated packet buffers.
ReceiveJobArguments
Arguments used by receive jobs.
ReliableSequencedPipelineStage
This pipeline stage can be used to ensure that packets sent through it will be delivered, and will be delivered in order. This is done by sending acknowledgements for received packets, and resending packets that have not been acknowledged in a while.
Note that a consequence of these guarantees is that if a packet is lost, subsequent packets will not be delivered until the lost packet has been resent and delivered. This is called head-of-line blocking and can add significant latency to delivered packets when it occurs. For this reason, only send through this pipeline traffic which must absolutely be delivered in order (e.g. RPCs or player actions). State updates that will be resent later anyway (e.g. snapshots) should not be sent through this pipeline stage.
Another reason to limit the amount of traffic sent through this pipeline is because it has limited bandwidth. Because of the need to keep packets around in case they need to be resent, only a limited number of packets can be in-flight at a time. This limit, called the window size, is 32 by default and can be increased to 64. See the documentation on pipelines for further details.
SendJobArguments
Arguments used by send jobs.
SimulatorPipelineStage
This pipeline stage can be used to add artificial network conditions (packet loss, latency, etc.) to the traffic going through it. This is useful to test a game under conditions closer to what can be observed in real networks.
SimulatorPipelineStageInSend
Obsolete. Use Simulator
TransportFunctionPointer<T>
Convenience wrapper around a Burst function pointer. Should only be used when defining
functions for custom INetwork
UDPNetworkInterface
Default interface used by Network
UnreliableSequencedPipelineStage
Pipeline stage that can be used to ensure the ordering of packets sent through it. Note that
it only guarantees the ordering, it does not make any reliability guarantees. This pipeline
stage basically just drops any packet that arrives out-of-order. For reliability guarantees,
use the Reliable
UnreliableSequencedPipelineStage.SequenceId
Stores per-instance data.
UnreliableSequencedPipelineStage.Statistics
Stores Unreliable
WebSocketNetworkInterface
Interface used to establish WebSocket connections.
WebSocketParameter
Parameters for WebSocket connections.
Interfaces
INetworkInterface
Network interfaces are the lowest level of the Unity Transport library. They are responsible for sending and receiving packets directly to/from the network. Conceptually, they act like sockets. Users can provide their own network interfaces by implementing this interface and passing a new instance of it to Create<N>(N).
Note that network interfaces are expected to be unmanaged types compatible with Burst.
However, it is possible to write them using managed types and code. Simply wrap them with
Wrap
INetworkParameter
Interface used to implement custom values for use with Network
INetworkPipelineStage
Interface that custom pipeline stages must implement.
Enums
NetworkConnection.State
Different states in which a Network
NetworkEvent.Type
Types of network events that can be returned by Pop
NetworkFamily
Indicates the type of endpoint a Networksa_family_t
in traditional BSD sockets.
NetworkPacketReceiver.AppendPacketMode
Obsolete. Part of the old INetworkInterface
API.
NetworkPipelineStage.Requests
Requests that a pipeline stage can make in their send and receive methods.
Delegates
NetworkPipelineStage.InitializeConnectionDelegate
Type of the method used to initialize connections.
NetworkPipelineStage.ReceiveDelegate
Type of the method used for the receive direction of the pipeline.
NetworkPipelineStage.SendDelegate
Type of the method used for the send direction of the pipeline.