- nuget引入WebSocketSharp
- 代码
string url= $@"ws://localhost:8006";
using (var ws = new WebSocket(url))
{
ws.OnMessage += (sender, e) =>
{
Console.WriteLine("Laputa says: " + e.Data);
};
ws.Connect();
ws.Send("BALUS");
Console.ReadKey(true);
}