public static Action <IApplicationBuilder> SyncHandler(MessageControllerResolver resolver) { return((Action <IApplicationBuilder>)(app => { app.Run(FunctionWrappersExtensions.AsHttpEndpoint(async context => { await context.Response.WriteBodyAsStringAsync(resolver.AcceptSerializedBulk(await context.Request.ReadBodyAsStringAsync()), "application/json"); })); })); }
public static Action <IApplicationBuilder> SocketHandler(MessageControllerResolver resolver) { return((Action <IApplicationBuilder>)(app => { app.Run(FunctionWrappersExtensions.AsHttpEndpoint(async context => { //resolver.Accept() await context.Response.WriteAsync("Socket"); })); })); }