LocalNetwork. Simulate the IBasicNetwork locally in a single applicaiton.
More...
|
|
| LocalNetwork () |
| | Creates a new local network.
|
| |
| void | StartServer (string serverAddress=null) |
| | Starts a server to allow incoming connections.
|
| |
| void | StopServer () |
| | Stops allowing incoming connections.
|
| |
| ConnectionId | Connect (string address) |
| | Connects to another address.
|
| |
| void | Shutdown () |
| | Disconnects all, StopsServer.
|
| |
| bool | SendData (ConnectionId userId, byte[] data, int offset, int length, bool reliable) |
| |
| void | Update () |
| | Call this every frame if you intend to read incoming messages using Dequeue. This will make sure all data is read received by the network.
|
| |
| bool | Dequeue (out NetworkEvent evt) |
| | Returns the next buffered network event.
|
| |
| bool | Peek (out NetworkEvent evt) |
| | Gets the next network event if there is any.
|
| |
| void | Flush () |
| | Flushes buffers (not used)
|
| |
| void | Disconnect (ConnectionId id) |
| | Disconnects a peer.
|
| |
|
void | Dispose () |
| | Disposable pattern. Will disconnect everything and destroy this object.
|
| |
|
|
static readonly string | LOCK_ADDRESS = "LOCK_ADDRESS_TEST" |
| | Special address that is treated as in-use for testing purposes.
|
| |
|
| virtual void | Dispose (bool disposing) |
| | Called during disposing.
|
| |
|
|
IList< ConnectionId > | Connections [get] |
| | Current list of used connection ids.
|
| |
|
bool | IsServer [get] |
| | True if accepting incoming connections.
|
| |
LocalNetwork. Simulate the IBasicNetwork locally in a single applicaiton.
◆ Connect()
| ConnectionId Byn.Awrtc.LocalNetwork.Connect |
( |
string | address | ) |
|
◆ Dequeue()
Returns the next buffered network event.
- Parameters
-
- Returns
Implements Byn.Awrtc.INetwork.
◆ Disconnect()
◆ Dispose()
| virtual void Byn.Awrtc.LocalNetwork.Dispose |
( |
bool | disposing | ) |
|
|
protectedvirtual |
Called during disposing.
- Parameters
-
◆ Flush()
| void Byn.Awrtc.LocalNetwork.Flush |
( |
| ) |
|
◆ Peek()
Gets the next network event if there is any.
- Parameters
-
- Returns
Implements Byn.Awrtc.INetwork.
◆ SendData()
| bool Byn.Awrtc.LocalNetwork.SendData |
( |
ConnectionId | userId, |
|
|
byte[] | data, |
|
|
int | offset, |
|
|
int | length, |
|
|
bool | reliable ) |
◆ Shutdown()
| void Byn.Awrtc.LocalNetwork.Shutdown |
( |
| ) |
|
◆ StartServer()
| void Byn.Awrtc.LocalNetwork.StartServer |
( |
string | serverAddress = null | ) |
|
◆ StopServer()
| void Byn.Awrtc.LocalNetwork.StopServer |
( |
| ) |
|
◆ Update()
| void Byn.Awrtc.LocalNetwork.Update |
( |
| ) |
|
Call this every frame if you intend to read incoming messages using Dequeue. This will make sure all data is read received by the network.
Implements Byn.Awrtc.INetwork.
The documentation for this class was generated from the following file:
- /Volumes/macdev/wrtc/main_new/awrtc/awrtc_cs_common/Byn.Awrtc/LocalNetwork.cs