Skip to main content

Unity.Networking.Transport.NetworkDriver.Concurrent

The Concurrent struct is used to create an Concurrent instance of the GenericNetworkDriver.

Inherited Members#

ValueType.Equals(Object)

ValueType.GetHashCode()

ValueType.ToString()

Object.Equals(Object, Object)

Object.GetType()

Object.ReferenceEquals(Object, Object)

Namespace: System.Dynamic.ExpandoObject#
Assembly: MLAPI.dll#
Syntax#
public struct Concurrent

Methods#

AbortSend(DataStreamWriter)#

Aborts a asynchronous send.

Declaration#

public void AbortSend(DataStreamWriter writer)

Parameters#

TypeNameDescription
DataStreamWriterwriterIf you require the payload to be of certain size.

Exceptions#

TypeCondition
System.InvalidOperationExceptionIf endsend is called with a matching BeginSend call.
System.InvalidOperationExceptionIf the connection got closed between the call of being and end send.

BeginSend(NetworkConnection, out DataStreamWriter, Int32)#

Acquires a DataStreamWriter for starting a asynchronous send.

Declaration#

public int BeginSend(NetworkConnection id, out DataStreamWriter writer, int requiredPayloadSize = 0)

Parameters#

TypeNameDescription
NetworkConnectionidThe NetworkConnection id to write through
DataStreamWriterwriterA DataStreamWriter to write to
System.Int32requiredPayloadSizeIf you require the payload to be of certain size

Returns#

TypeDescription
System.Int32Returns Success on a successful acquire. Otherwise returns an StatusCode indicating the error.

Remarks#

Will throw a System.InvalidOperationException if the connection is in a Connecting state.

BeginSend(NetworkPipeline, NetworkConnection, out DataStreamWriter, Int32)#

Acquires a DataStreamWriter for starting a asynchronous send.

Declaration#

public int BeginSend(NetworkPipeline pipe, NetworkConnection id, out DataStreamWriter writer, int requiredPayloadSize = 0)

Parameters#

TypeNameDescription
NetworkPipelinepipeThe NetworkPipeline to write through
NetworkConnectionidThe NetworkConnection id to write through
DataStreamWriterwriterA DataStreamWriter to write to
System.Int32requiredPayloadSizeIf you require the payload to be of certain size

Returns#

TypeDescription
System.Int32Returns Success on a successful acquire. Otherwise returns an StatusCode indicating the error.

Remarks#

Will throw a System.InvalidOperationException if the connection is in a Connecting state.

EndSend(DataStreamWriter)#

Ends a asynchronous send.

Declaration#

public int EndSend(DataStreamWriter writer)

Parameters#

TypeNameDescription
DataStreamWriterwriterIf you require the payload to be of certain size.

Returns#

TypeDescription
System.Int32The length of the buffer sent if nothing went wrong.

Exceptions#

TypeCondition
System.InvalidOperationExceptionIf endsend is called with a matching BeginSend call.
System.InvalidOperationExceptionIf the connection got closed between the call of being and end send.

GetConnectionState(NetworkConnection)#

Declaration#

public NetworkConnection.State GetConnectionState(NetworkConnection id)

Parameters#

TypeNameDescription
NetworkConnectionid

Returns#

TypeDescription
NetworkConnection.State

MaxHeaderSize(NetworkPipeline)#

Declaration#

public int MaxHeaderSize(NetworkPipeline pipe)

Parameters#

TypeNameDescription
NetworkPipelinepipe

Returns#

TypeDescription
System.Int32

PopEventForConnection(NetworkConnection, out DataStreamReader)#

Declaration#

public NetworkEvent.Type PopEventForConnection(NetworkConnection connectionId, out DataStreamReader reader)

Parameters#

TypeNameDescription
NetworkConnectionconnectionId
DataStreamReaderreader

Returns#

TypeDescription
NetworkEvent.Type

PopEventForConnection(NetworkConnection, out DataStreamReader, out NetworkPipeline)#

Declaration#

public NetworkEvent.Type PopEventForConnection(NetworkConnection connectionId, out DataStreamReader reader, out NetworkPipeline pipeline)

Parameters#

TypeNameDescription
NetworkConnectionconnectionId
DataStreamReaderreader
NetworkPipelinepipeline

Returns#

TypeDescription
NetworkEvent.Type