Skip to content

olif/webster

Repository files navigation

Webster - A tiny .net core websocket server


A small websocket server.

Usage

  1. Implement the abstract class WebSocketServer.
public class DummyServer : WebSocketServer
{
	protected override void OnMessageReceived(IWebSocketConnection conn, string message)
	{
		conn.Send("Echo");
	}

	protected override void OnConnectionClosed(IWebSocketConnection conn)
	{
		throw new NotImplementedException();
	}

	protected override void OnConnectionOpened(IWebSocketConnection conn, HttpContext context)
	{
		throw new NotImplementedException();
	}
}
  1. Register websockets and the websocket server
app.UseWebSockets();
app.UseWebSocketServer(new DummyServer());

About

A tiny .net core web socket server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages