Skip to main content

Unity.Networking.Transport.INetworkInterface

Interface for implementing a low-level networking interface see BaselibNetworkInterface as an example

Inherited Members#

IDisposable.Dispose()

Namespace: System.Dynamic.ExpandoObject#
Assembly: transport.dll#
Syntax#
public interface INetworkInterface : IDisposable

LocalEndPoint#

Gets the value of the local end point

Declaration#

NetworkInterfaceEndPoint LocalEndPoint { get; }

Property Value#

TypeDescription
NetworkInterfaceEndPoint

#

Bind(NetworkInterfaceEndPoint)#

Binds the medium to a specific endpoint.

Declaration#

int Bind(NetworkInterfaceEndPoint endpoint)

Parameters#

TypeNameDescription
NetworkInterfaceEndPointendpointA valid NetworkInterfaceEndPoint.

Returns#

TypeDescription
System.Int320 on Success

CreateInterfaceEndPoint(NetworkEndPoint, out NetworkInterfaceEndPoint)#

Creates the interface end point using the specified address

Declaration#

int CreateInterfaceEndPoint(NetworkEndPoint address, out NetworkInterfaceEndPoint endpoint)

Parameters#

TypeNameDescription
NetworkEndPointaddressThe address
NetworkInterfaceEndPointendpointThe endpoint

Returns#

TypeDescription
System.Int32The int

CreateSendInterface()#

Creates the send interface

Declaration#

NetworkSendInterface CreateSendInterface()

Returns#

TypeDescription
NetworkSendInterfaceThe network send interface

GetGenericEndPoint(NetworkInterfaceEndPoint)#

Gets the generic end point using the specified endpoint

Declaration#

NetworkEndPoint GetGenericEndPoint(NetworkInterfaceEndPoint endpoint)

Parameters#

TypeNameDescription
NetworkInterfaceEndPointendpointThe endpoint

Returns#

TypeDescription
NetworkEndPointThe network end point

Initialize(INetworkParameter[])#

Initializes the interfacing passing in optional INetworkParameter

Declaration#

int Initialize(params INetworkParameter[] param)

Parameters#

TypeNameDescription
INetworkParameter[]paramThe param

Returns#

TypeDescription
System.Int32The int

Listen()#

Start listening for incoming connections. This is normally a no-op for real UDP sockets.

Declaration#

int Listen()

Returns#

TypeDescription
System.Int320 on Success

ScheduleReceive(NetworkPacketReceiver, JobHandle)#

Schedule a ReceiveJob. This is used to read data from your supported medium and pass it to the AppendData function supplied by NetworkDriver

Declaration#

JobHandle ScheduleReceive(NetworkPacketReceiver receiver, JobHandle dep)

Parameters#

TypeNameDescription
NetworkPacketReceiverreceiverA NetworkDriver used to parse the data received.
JobHandledepA to any dependency we might have.

Returns#

TypeDescription
JobHandleA to our newly created ScheduleReceive Job.

ScheduleSend(NativeQueue\<QueuedSendMessage>, JobHandle)#

Schedule a SendJob. This is used to flush send queues to your supported medium

Declaration#

JobHandle ScheduleSend(NativeQueue<QueuedSendMessage> sendQueue, JobHandle dep)

Parameters#

TypeNameDescription
NativeQueue\<QueuedSendMessage>sendQueueThe send queue which can be used to emulate parallel send.
JobHandledepA to any dependency we might have.

Returns#

TypeDescription
JobHandleA to our newly created ScheduleSend Job.

See Also#

System.IDisposable