Created
February 27, 2019 09:07
-
-
Save jymcheong/c582a9c8e30304dedb5a8c4ea7bd2a80 to your computer and use it in GitHub Desktop.
WebSocket4Net example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using WebSocket4Net; | |
namespace websocket | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
using (var ws = new WebSocket("ws://1.2.3.4:8080/")) | |
{ | |
ws.MessageReceived += Ws_MessageReceived; | |
ws.Closed += Ws_Closed; | |
ws.Open(); | |
Console.ReadKey(true); | |
} | |
} | |
private static void Ws_Closed(object sender, EventArgs e) | |
{ | |
Console.WriteLine("server closed"); | |
} | |
private static void Ws_MessageReceived(object sender, MessageReceivedEventArgs e) | |
{ | |
Console.WriteLine("Server said: " + e.Message); | |
} | |
} | |
} |
Hi have a food day,can you help me to find the solution on my problem,I creating a chat application,my problem is,I when I join chatroom,the chatroom showing captcha and need to submit captcha before joining,I don't know how to submit it,I can get the captcha result but I won't know how to submit it and join the chatroom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use Packet Manager Console/UI to add WebSocket4Net to the project first.