Click or drag to resize

ProtocolServerOpen(ProtocolAddress, IEnumerableType, ServiceConnectionAsync, CallbackContext) Method

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: 19.01.00
Syntax
C#
public static ServerSocket Open(
	ProtocolAddress address,
	IEnumerable<Type> services,
	ServiceConnectionAsync serviceConnection,
	CallbackContext callbackContext = CallbackContext.CallerContext
)

Parameters

address  ProtocolAddress
Address of server.
services  IEnumerableType
Required services.
serviceConnection  ServiceConnectionAsync
Connection service delegate (or null).
callbackContext  CallbackContext  (Optional)
Defines the context in which serviceConnection should be called.

Return Value

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