Interface INetworkInterface
Interface for implementing a low-level networking interface see Baselib
Inherited Members
Namespace: Unity.Networking.Transport
Assembly: Unity.Networking.Transport.dll
Syntax
public interface INetworkInterface : IDisposable
Properties
LocalEndPoint
Gets the value of the local end point
Declaration
NetworkInterfaceEndPoint LocalEndPoint { get; }
Property Value
Type | Description |
---|---|
Network |
See Also
Methods
Bind(NetworkInterfaceEndPoint)
Binds the medium to a specific endpoint.
Declaration
int Bind(NetworkInterfaceEndPoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
Network |
endpoint | A valid Network |
Returns
Type | Description |
---|---|
int | 0 on Success |
See Also
CreateInterfaceEndPoint(NetworkEndPoint, out NetworkInterfaceEndPoint)
Creates the interface end point using the specified address
Declaration
int CreateInterfaceEndPoint(NetworkEndPoint address, out NetworkInterfaceEndPoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
Network |
address | The address |
Network |
endpoint | The endpoint |
Returns
Type | Description |
---|---|
int | The int |
See Also
CreateSendInterface()
Creates the send interface
Declaration
NetworkSendInterface CreateSendInterface()
Returns
Type | Description |
---|---|
Network |
The network send interface |
See Also
GetGenericEndPoint(NetworkInterfaceEndPoint)
Gets the generic end point using the specified endpoint
Declaration
NetworkEndPoint GetGenericEndPoint(NetworkInterfaceEndPoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
Network |
endpoint | The endpoint |
Returns
Type | Description |
---|---|
Network |
The network end point |
See Also
Initialize(NetworkSettings)
Initializes the interfacing passing in optional INetwork
Declaration
int Initialize(NetworkSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | Network |
Returns
Type | Description |
---|---|
int | 0 if initialization was successful, negative value otherwise. |
See Also
Listen()
Start listening for incoming connections. This is normally a no-op for real UDP sockets.
Declaration
int Listen()
Returns
Type | Description |
---|---|
int | 0 on Success |
See Also
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 Network
Declaration
JobHandle ScheduleReceive(NetworkPacketReceiver receiver, JobHandle dep)
Parameters
Type | Name | Description |
---|---|---|
Network |
receiver | A Network |
Job |
dep | A Job |
Returns
See Also
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
Type | Name | Description |
---|---|---|
Native |
sendQueue | The send queue which can be used to emulate parallel send. |
Job |
dep | A Job |