Class EasyHost
Listens for incoming EasyClient connections
Namespace: EasyCommunication.Host.Connection
Assembly: EasyCommunication.dll
Syntax
Constructors
EasyHost(Int32, Int32, IPAddress)
Creates an instance of EasyHost with a Heartbeat Interval, a Listening Port and a Listening Address.
Declaration
Parameters
Type
Name
Description
System.Int32
heartbeatInterval
Heartbeat Interval
System.Int32
listeningPort
Properties
ClientConnections
All Connections with received Heartbeats since last query, used by EasyCommunication.Host.Connection.Heartbeat.
Declaration
Property Value
Type
Description
System.Collections.Generic.Dictionary<System.Net.Sockets.TcpClient, System.Int32>
EventHandler
EventHandler for EasyHost-events
Declaration
Property Value
Type
Description
HostEventHandler
ListeningPort
The port on which the Host is listening for incoming connections
Declaration
Property Value
Type
Description
System.Int32
TcpListener
The TcpListener used to listen for incoming connections.
Declaration
Property Value
Type
Description
System.Net.Sockets.TcpListener
Methods
Close()
Closes the TcpListener from listening for connections
Declaration
Open()
Open the TcpListener to listen for connections
Declaration
SendData<T>(T, TcpClient)
Sends data to the specified receiver
Declaration
Parameters
Type
Name
Description
T
data
Data to send
System.Net.Sockets.TcpClient
receiver
Receiver of the data
Returns
Type
Description
Type Parameters
Name
Description
T
Custom Type which has to be either JsonConvert'able or Serializable
Last updated
Was this helpful?