WebSocketListener
WebSocketListener copied to clipboard
How to use OnHttpNegotiation in 3.0.0
Hello,
I am having .Net core 2.1 Application with nuget package version 3.0.0, I am getting error while using OnHttpNegotiation in my application as below as it expects return type and I dnt know how to use in Websocketlistner options
`var wsoptions = new vtortola.WebSockets.WebSocketListenerOptions()
{
OnHttpNegotiation = (request, response) =>
{
if (request.RequestUri.ToString() == "/1")
{
response.Status = vtortola.WebSockets.HttpStatusCode.BadRequest;
}
else
{
response.Status = vtortola.WebSockets.HttpStatusCode.Accepted;
}
}
};`