Struct WebSocketNetworkInterface
Interface used to establish WebSocket connections.
Inherited Members
Namespace: Unity.Networking.Transport
Assembly: solution.dll
Syntax
[BurstCompile]
public struct WebSocketNetworkInterface : INetworkInterface, IDisposable
Examples
This code creates a Network
var driver = NetworkDriver.Create(new WebSocketNetworkInterface());
// Can then be used just like a UDP-based driver.
Properties
Name | Description |
---|---|
Local |
Gets the local endpoint that the interface will use to communicate on the network.
This call only makes sense after Bind(Network |
Methods
Name | Description |
---|---|
Bind(Network |
Binds the network interface to an endpoint. This is meant to act the same way as the
|
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Initialize(ref Network |
Initialize the network interface with the given settings. |
Listen() | Start listening for incoming connections. Unlike Bind(Network |
Schedule |
Schedule a receive job. This job's responsibility is to read data from the network and
enqueue it in Receive |
Schedule |
Schedule a send job. This job's responsibility is to flush any data stored in
Send |