Show / Hide Table of Contents

Class NetworkServer

Start the servers needed for the tcp connection. UDP listener responds with the TCP IP address and port of the server.

Inheritance
object
NetworkServer
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: HoloMetrix.Net.Remote
Assembly: HoloMetrix.Net.Remote.dll
Syntax
public class NetworkServer

Constructors

| Improve this Doc View Source

NetworkServer(int)

Initializes a new instance of the NetworkServer class.

Declaration
public NetworkServer(int tcpPort = 51051)
Parameters
Type Name Description
int tcpPort

The tcp port to use for data communication.

Properties

| Improve this Doc View Source

IsBluetoothRunning

Gets a value indicating whether the Bluetooth service is running.

Declaration
public bool IsBluetoothRunning { get; }
Property Value
Type Description
bool
| Improve this Doc View Source

TCPPort

Gets the tcp port that the server listens on for incoming connections.

Declaration
public int TCPPort { get; }
Property Value
Type Description
int
| Improve this Doc View Source

UDPPort

Gets the port that receives UDP broadcast messages. This is used to request the tcp address.

Declaration
public int UDPPort { get; }
Property Value
Type Description
int

Methods

| Improve this Doc View Source

StartServers(int?)

Start the UDP listener to receive broadcast messages. Start the TCP listener to accept incoming connections. Start the Bluetooth service.

Declaration
public void StartServers(int? broadcastPort = null)
Parameters
Type Name Description
int? broadcastPort
| Improve this Doc View Source

StopAllServices()

Stops all active network services (TCP, UDP, Bluetooth).

Declaration
public void StopAllServices()

Events

| Improve this Doc View Source

ConnectionEstablished

Event raised when a client connects to the server.

Declaration
public event Action ConnectionEstablished
Event Type
Type Description
Action
| Improve this Doc View Source

ConnectionLost

Event raised when the network connection is lost.

Declaration
public event Action ConnectionLost
Event Type
Type Description
Action
  • Improve this Doc
  • View Source
Back to top Generated by DocFX