Struct IPCNetworkInterface
The ipc network interface
Inherited Members
Namespace: Unity.Networking.Transport
Assembly: Unity.Networking.Transport.dll
Syntax
public struct IPCNetworkInterface : INetworkInterface, IDisposable
Properties
LocalEndPoint
Gets the value of the local end point
Declaration
public NetworkInterfaceEndPoint LocalEndPoint { get; }
Property Value
Type | Description |
---|---|
Network |
Methods
Bind(NetworkInterfaceEndPoint)
Binds the medium to a specific endpoint.
Declaration
public int Bind(NetworkInterfaceEndPoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
Network |
endpoint | A valid Network |
Returns
Type | Description |
---|---|
int | 0 on Success |
CreateInterfaceEndPoint(NetworkEndPoint, out NetworkInterfaceEndPoint)
Creates an interface end point. Only available for loopback addresses.
Declaration
public int CreateInterfaceEndPoint(NetworkEndPoint address, out NetworkInterfaceEndPoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
Network |
address | Loopback address |
Network |
endpoint | The endpoint |
Returns
Type | Description |
---|---|
int | The status code of the result, 0 being a success. |
CreateSendInterface()
Creates the send interface
Declaration
public NetworkSendInterface CreateSendInterface()
Returns
Type | Description |
---|---|
Network |
The network send interface |
Dispose()
Cleans up both the local end point and the IPCManager instance.
Declaration
public void Dispose()
GetGenericEndPoint(NetworkInterfaceEndPoint)
Retrieves an already created endpoint with port or creates one.
Declaration
public NetworkEndPoint GetGenericEndPoint(NetworkInterfaceEndPoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
Network |
endpoint | The loopback endpoint |
Returns
Type | Description |
---|---|
Network |
NetworkEndPoint |
Initialize(NetworkSettings)
Initializes the interface passing in optional INetwork
Declaration
public int Initialize(NetworkSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | Network |
Returns
Type | Description |
---|---|
int | Returns 0 on success. |
Listen()
Start listening for incoming connections. This is normally a no-op for real UDP sockets.
Declaration
public int Listen()
Returns
Type | Description |
---|---|
int | 0 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 Network
Declaration
public JobHandle ScheduleReceive(NetworkPacketReceiver receiver, JobHandle dep)
Parameters
Type | Name | Description |
---|---|---|
Network |
receiver | A Network |
Job |
dep | A Job |
Returns
ScheduleSend(NativeQueue<QueuedSendMessage>, JobHandle)
Schedule a SendJob. This is used to flush send queues to your supported medium
Declaration
public 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 |