Click or drag to resize

ProtocolServerOpenT Method (ProtocolAddress, ServiceClientAsyncT, CallbackContext)

Creates a server and starts accepting connections, calling 'serviceConnection' with each connection established. 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 ServerSocket Open<T>(
	ProtocolAddress address,
	ServiceClientAsync<T> serviceConnection,
	CallbackContext callbackContext
)
where T : class

Parameters

address
Type: Demo3D.NetProtocolAddress
Address of server.
serviceConnection
Type: Demo3D.NetServiceClientAsyncT
Connection service delegate (or null).
callbackContext
Type: Demo3D.NetCallbackContext
Defines the context in which serviceConnection should be called.

Type Parameters

T
Required services.

Return Value

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