-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
Currently, you have this as your client example code:
//...refs
using Alchemy;
using Alchemy.Classes;
static void Main(string[] args)
{
var aClient = new WebSocketClient("ws://alchemywebsockets.net:81/chat"){
OnReceive = OnReceive,
OnSend = OnSend,
OnConnect = OnConnected,
OnConnected = OnConnect,
OnDisconnect = OnDisconnect
});
aClient.Connect();
aClient.Send("Hey!"); // string or byte[]
aClient.Disconnect();
}
static void OnReceive(UserContext context)
{
Console.WriteLine("The server said : " + context.DataFrame.ToString());
}
//...etc
However, there is a problem with how you initialize the WebSocketClient. You should remove the closing parentheses after the closing bracket, to make it look like this.
WebSocketClient("ws://alchemywebsockets.net:81/chat"){
OnReceive = OnReceive,
OnSend = OnSend,
OnConnect = OnConnected,
OnConnected = OnConnect,
OnDisconnect = OnDisconnect
};
Not a big issue, thought I would just suggest it. Doesn't look like this repo gets updated much anyways.
Metadata
Metadata
Assignees
Labels
No labels