This is an open source project implementing WebSocket (RFC6455) using .NET Core. As we commonly see websockets being used on chats, this project aims to apply websocket communication not only on chats but also on different applicable scenarious.
Content
Prerequisities:
https://www.microsoft.com/net/learn/get-started/windows (.NET Core SDK - Windows)
https://www.microsoft.com/net/learn/get-started/linux (.NET Core SDK - Linux)
https://www.microsoft.com/net/learn/get-started/macos (.NET Core SDK - macOS)
http://activemq.apache.org/getting-started.html (ActiveMQ)
Run Visual Studio Code Integrated Terminal (bash/cmd):
dotnet restore
dotnet build
dotnet run
Run ActiveMQ on Docker
docker pull webcenter/activemq
docker run --name='activemq' -d -p 8161:8161 -p 61616:61616 -p 61613:61613 webcenter/activemq:latest
This WebSocket uses xUnit as a test framework. It can be easily tested by running the command below.
dotnet test
This application works through the url's shown below:
http://localhost:<port>/swagger (API documentation)
http://localhost:<port>/<version>/api/version/<resource> (API)
http://localhost:<port>/<version>/ws (WebSocket)
Available API resources:
Resource | Entity | HTTP Verbs | Query Strings |
---|---|---|---|
/notification | Notification | POST |
http://localhost:<port>/api/v1/notification
ws://localhost:<port>/v1/ws