Class NetworkManager<TService>
Inherited Members
Namespace: Microsoft.MixedReality.SpectatorView
Assembly: cs.temp.dll.dll
Syntax
public abstract class NetworkManager<TService> : CommandRegistry<TService>, INetworkManager, ICommandRegistry where TService : Singleton<TService>
Type Parameters
| Name | Description |
|---|---|
| TService |
Fields
connectionManager
Declaration
protected TCPConnectionManager connectionManager
Field Value
| Type | Description |
|---|---|
| TCPConnectionManager |
Properties
AttemptReconnectWhenClient
Declaration
public bool AttemptReconnectWhenClient { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ConnectedIPAddress
Gets the local IP address reported by the socket used to connect to the device.
Declaration
public string ConnectedIPAddress { get; }
Property Value
| Type | Description |
|---|---|
| String |
IsConnected
Gets whether or not a network connection to the device is established.
Declaration
public bool IsConnected { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
IsConnecting
Gets whether or not a network connection to the device is pending.
Declaration
public bool IsConnecting { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
RemotePort
Gets the port used to connect to the remote device.
Declaration
protected abstract int RemotePort { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
TimeSinceLastUpdate
Gets the time since this network manager last received an update.
Declaration
public TimeSpan TimeSinceLastUpdate { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Methods
Awake()
Declaration
protected override void Awake()
Overrides
Microsoft.MixedReality.SpectatorView.Singleton<TService>.Awake()
Broadcast(Byte[])
Sends data to other connected devices
Declaration
public void Broadcast(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Byte[] | data | payload to send to other devices |
ConnectTo(String)
Connect to a remote device on the default port for this network manager.
Declaration
public void ConnectTo(string remoteAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| String | remoteAddress |
ConnectTo(String, Int32)
Connect to a remote device using the specified port.
Declaration
public void ConnectTo(string ipAddress, int port)
Parameters
| Type | Name | Description |
|---|---|---|
| String | ipAddress | |
| Int32 | port | The port to use for communication. |
Disconnect()
Disconnects the network connection to the holographic camera rig.
Declaration
public void Disconnect()
OnConnected(SocketEndpoint)
Declaration
protected virtual void OnConnected(SocketEndpoint endpoint)
Parameters
| Type | Name | Description |
|---|---|---|
| SocketEndpoint | endpoint |
OnDestroy()
Declaration
protected override void OnDestroy()
Overrides
Microsoft.MixedReality.SpectatorView.Singleton<TService>.OnDestroy()
OnDisconnected(SocketEndpoint)
Declaration
protected virtual void OnDisconnected(SocketEndpoint endpoint)
Parameters
| Type | Name | Description |
|---|---|---|
| SocketEndpoint | endpoint |
OnReceive(IncomingMessage)
Declaration
protected void OnReceive(IncomingMessage data)
Parameters
| Type | Name | Description |
|---|---|---|
| IncomingMessage | data |
Start()
Declaration
protected virtual void Start()
StartListening(Int32)
Starts a listening socket on the given port.
Declaration
public void StartListening(int port)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | port | The port to listen for new connections on. |