Struct NetworkDriver
The NetworkDriver is an implementation of Virtual Connections over any transport.
Basic usage:
var driver = NetworkDriver.Create();
Implements
Inherited Members
Namespace: Unity.Networking.Transport
Assembly: solution.dll
Syntax
public struct NetworkDriver : IDisposable
Constructors
Name | Description |
---|---|
Network |
|
Network |
|
Network |
Properties
Name | Description |
---|---|
Bound | Whether the driver is bound to an endpoint. |
Is |
Returns if NetworkDriver has been created |
Last |
Gets the value of the last update time |
Listening | Whether the driver is listening for connections. |
Receive |
Gets or sets Receive Error Code |
Methods
Name | Description |
---|---|
Abort |
Aborts a asynchronous send. |
Accept() | Checks to see if there are any new connections to Accept. |
Begin |
Acquires a DataStreamWriter for starting a asynchronous send. |
Begin |
Acquires a DataStreamWriter for starting a asynchronous send. |
Bind(Network |
Bind the driver to a endpoint. |
Connect(Network |
Connects the driver to a endpoint |
Create() | Helper function for creating a NetworkDriver. |
Create(params INetwork |
|
Create(Network |
Helper function for creating a NetworkDriver. |
Create |
Create a new pipeline. |
Create<N>(N) | Helper function for creating a NetworkDriver. |
Create<N>(N, Network |
Helper function for creating a NetworkDriver. |
Disconnect(Network |
Disconnects a NetworkConnection |
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
End |
Ends a asynchronous send. |
Get |
Gets the connection state using the specified Network |
Get |
Returns the size of the EventQueue for a specific connection |
Get |
Returns the PipelineBuffers for a specific pipeline and stage. |
Listen() | Set the driver to Listen for incoming connections |
Local |
Returns local Network |
Max |
Max headersize including optional Network |
Pop |
Pops an event |
Pop |
Pops an event |
Pop |
Pops an event for a specific connection |
Pop |
Pops an event for a specific connection |
Remote |
|
Schedule |
Schedules flushing the sendqueue. Should be called in cases where you want the driver to send before the
next Schedule |
Schedule |
Schedules update for driver. This should be called once a frame. |
To |
Create a Concurrent Copy of the NetworkDriver. |