Click or drag to resize

TpktServerOpenAsync Method (Boolean, Int32, NotifyDataChangedEventHandler)

Open a TPKT server. Creates a server and starts accepting connections, calling 'dataChangedHandler' with data from each connection as it arrives. This method returns after the server has been established, leaving the accepting and servicing of connections to a background thread.

Namespace:  Demo3D.Net.Protocols
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 15.0.2.11458
Syntax
C#
public static Task<ServerSocket> OpenAsync(
	bool sync,
	int port,
	NotifyDataChangedEventHandler dataChangedHandler
)

Parameters

sync
Type: SystemBoolean
If true, the Task returned is guaranteed to be complete.
port
Type: SystemInt32
The port to open the server on.
dataChangedHandler
Type: Demo3D.NetNotifyDataChangedEventHandler
Delegate for servicing new data arriving on a client connection.

Return Value

Type: TaskServerSocket
The TPKT protocol server socket.
See Also