public Task Invoke(ISockContext context)
 {
     return(Task.CompletedTask);
 }
Example #2
0
 public DefaultSockRequest(byte[] buffer, ISockContext context)
 {
     Buffer  = buffer ?? throw new ArgumentNullException(nameof(buffer));
     Context = context;
 }
Example #3
0
 public override Task Invoke(ISockContext context)
 {
     return(_middleware(context, (c) => Next(c)));
 }
Example #4
0
 public override async Task Invoke(ISockContext context)
 {
     Console.WriteLine($"Buffer length: {context.Request.Length}");
     Console.WriteLine($"Buffer data:\n{context.Request.ReadAsString()}");
     await Next(context);
 }
Example #5
0
 public abstract Task Invoke(ISockContext context);
Example #6
0
 public DefaultSockResponse(ISockContext context)
 {
     Context = context;
 }
Example #7
0
 public async Task ExecuteAsync(ISockContext context)
 {
     await _start.Invoke(context);
 }