Struct GenericNetworkDriver<T, TNetworkPipelineStageCollection>
The GenericNetworkDriver is an implementation of Virtual Connections over any transport.
Basic usage:
var driver = new GenericNetworkDriver<IPv4UDPSocket>(new INetworkParameter[0]);
Syntax
public struct GenericNetworkDriver<T, TNetworkPipelineStageCollection> : INetworkDriver, IDisposable, INetworkPacketReceiver, INetworkPipelineReceiver where T : struct, INetworkInterface where TNetworkPipelineStageCollection : struct, INetworkPipelineStageCollection
Type Parameters
Constructors
GenericNetworkDriver(INetworkParameter[])
Constructor for GenericNetworkDriver.
Declaration
public GenericNetworkDriver(params INetworkParameter[] param)
Parameters
Properties
IsCreated
Declaration
public bool IsCreated { get; }
Property Value
Implements
Listening
Declaration
public bool Listening { get; }
Property Value
Implements
ReceiveCount
Declaration
public int ReceiveCount { get; set; }
Property Value
Implements
ReceiveErrorCode
Declaration
public int ReceiveErrorCode { get; set; }
Property Value
Implements
Methods
Accept()
Declaration
public NetworkConnection Accept()
Returns
Implements
Declaration
public int AppendPacket(NetworkEndPoint address, UdpCHeader header, int dataLen)
Parameters
Returns
Implements
Bind(NetworkEndPoint)
Declaration
public int Bind(NetworkEndPoint endpoint)
Parameters
Returns
Implements
Connect(NetworkEndPoint)
Declaration
public NetworkConnection Connect(NetworkEndPoint endpoint)
Parameters
Returns
Implements
CreatePipeline(Type[])
Declaration
public NetworkPipeline CreatePipeline(params Type[] stages)
Parameters
Type |
Name |
Description |
Type[] |
stages |
|
Returns
Implements
Disconnect(NetworkConnection)
Declaration
public int Disconnect(NetworkConnection id)
Parameters
Returns
Implements
Dispose()
Declaration
DynamicDataStreamSize()
Declaration
public bool DynamicDataStreamSize()
Returns
Implements
GetConnectionState(NetworkConnection)
Declaration
public NetworkConnection.State GetConnectionState(NetworkConnection con)
Parameters
Returns
Implements
GetDataStream()
Declaration
public DataStreamWriter GetDataStream()
Returns
Implements
GetPipelineBuffers(Type, NetworkConnection, ref NativeSlice<Byte>, ref NativeSlice<Byte>, ref NativeSlice<Byte>)
Declaration
public void GetPipelineBuffers(Type pipelineType, NetworkConnection connection, ref NativeSlice<byte> readProcessingBuffer, ref NativeSlice<byte> writeProcessingBuffer, ref NativeSlice<byte> sharedBuffer)
Parameters
Type |
Name |
Description |
Type |
pipelineType |
|
NetworkConnection |
connection |
|
NativeSlice<Byte> |
readProcessingBuffer |
|
NativeSlice<Byte> |
writeProcessingBuffer |
|
NativeSlice<Byte> |
sharedBuffer |
|
GetPipelineBuffers(NetworkPipeline, Int32, NetworkConnection, ref NativeSlice<Byte>, ref NativeSlice<Byte>, ref NativeSlice<Byte>)
Declaration
public void GetPipelineBuffers(NetworkPipeline pipeline, int stageId, NetworkConnection connection, ref NativeSlice<byte> readProcessingBuffer, ref NativeSlice<byte> writeProcessingBuffer, ref NativeSlice<byte> sharedBuffer)
Parameters
Listen()
Declaration
Returns
Implements
LocalEndPoint()
Declaration
public NetworkEndPoint LocalEndPoint()
Returns
Implements
PopEvent(out NetworkConnection, out DataStreamReader)
Declaration
public NetworkEvent.Type PopEvent(out NetworkConnection con, out DataStreamReader slice)
Parameters
Returns
Implements
PopEventForConnection(NetworkConnection, out DataStreamReader)
Declaration
public NetworkEvent.Type PopEventForConnection(NetworkConnection connectionId, out DataStreamReader slice)
Parameters
Returns
Implements
PushDataEvent(NetworkConnection, NativeSlice<Byte>)
Declaration
public void PushDataEvent(NetworkConnection con, NativeSlice<byte> data)
Parameters
Implements
RemoteEndPoint(NetworkConnection)
Declaration
public NetworkEndPoint RemoteEndPoint(NetworkConnection id)
Parameters
Returns
Implements
ScheduleUpdate(JobHandle)
Declaration
public JobHandle ScheduleUpdate(JobHandle dep = null)
Parameters
Type |
Name |
Description |
JobHandle |
dep |
|
Returns
Type |
Description |
JobHandle |
|
Implements
Send(NetworkPipeline, NetworkConnection, IntPtr, Int32)
Declaration
public int Send(NetworkPipeline pipe, NetworkConnection id, IntPtr data, int len)
Parameters
Returns
Implements
Send(NetworkPipeline, NetworkConnection, DataStreamWriter)
Declaration
public int Send(NetworkPipeline pipe, NetworkConnection id, DataStreamWriter strm)
Parameters
Returns
Implements
ToConcurrent()
Create a Concurrent Copy of the NetworkDriver.
Declaration
public GenericNetworkDriver<T, TNetworkPipelineStageCollection>.Concurrent ToConcurrent()
Returns