Click or drag to resize

ProtocolServerOpenAsyncT Method (ProtocolAddress, NotifyDataChangedEventHandler)

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
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 10.0.0.0 (10.0.0.0)
Syntax
C#
public static Task<ServerSocket> OpenAsync<T>(
	ProtocolAddress address,
	NotifyDataChangedEventHandler dataChangedHandler
)
where T : class, INotifyDataChanged

Parameters

address
Type: Demo3D.NetProtocolAddress
Address of server.
dataChangedHandler
Type: Demo3D.NetNotifyDataChangedEventHandler
Data received handler.

Type Parameters

T
Required services.

Return Value

Type: TaskServerSocket
The server socket.
Remarks
dataChangedHandler is Demo3D thread safe. It's called in the same thread (synchronization context) as the caller to this method.
See Also