ServerFactory.Create Method

Definition

Creates an IPC server.

public static Microsoft.ServiceHub.Framework.IIpcServer Create (Func<System.IO.Stream,System.Threading.Tasks.Task> onConnectedCallback, Microsoft.ServiceHub.Framework.ServerFactory.ServerOptions options = default);
static member Create : Func<System.IO.Stream, System.Threading.Tasks.Task> * Microsoft.ServiceHub.Framework.ServerFactory.ServerOptions -> Microsoft.ServiceHub.Framework.IIpcServer
Public Shared Function Create (onConnectedCallback As Func(Of Stream, Task), Optional options As ServerFactory.ServerOptions = Nothing) As IIpcServer

Parameters

onConnectedCallback
Func<Stream,Task>

Callback function to be run whenever a client connects to the server. This may be called concurrently if multiple clients connect. The delegate may choose to return right away while still using the Stream or to complete only after finishing communication with the client.

options
ServerFactory.ServerOptions

IPC server options.

Returns

The server, which includes a means to obtain its pipe name and monitor for completion.

Applies to