This project provides a way to connect to send messages to an Azure Event Hub using the HTML 5 WebSocket API.
This project depends on .NET Core, which can be found here.
The CoreServer project acts as a proxy for Azure Event Hubs. The client (HTML5 WebSocket) connects to the CoreServer, sends authentication information, then the server sends the messages received from the client to the event hub.
The project can be built by navigating to \CoreServer\
and running
dotnet build
or the project can be built in Visual Studio.
- Authenticate - 'A' -
A<ConnectionString>
-AEndpoint=...
- Send - 'S' -
S<Message>
-SHello, world!
- Finish receive command.
- Persistent commands - Add a command that tells the server to keep using the same command for each subsequent message received from the client.
The client sends commands to the server, then the server executes those commands.
- Connect to the web socket server.
In Javascript:
var socket = new WebSocket()
- Send the authenticate command.
A<connectionString>
- Send a message
SHello
- Check that the message was received by the event hub.