Fix a few for Example
This commit is contained in:
parent
7959e45edd
commit
ee59fb3755
@ -15,11 +15,9 @@ namespace Example
|
|||||||
//using (var ws = new WebSocket ("ws://localhost:4649/Echo"))
|
//using (var ws = new WebSocket ("ws://localhost:4649/Echo"))
|
||||||
//using (var ws = new WebSocket ("wss://localhost:4649/Echo"))
|
//using (var ws = new WebSocket ("wss://localhost:4649/Echo"))
|
||||||
//using (var ws = new WebSocket ("ws://localhost:4649/Echo?name=nobita"))
|
//using (var ws = new WebSocket ("ws://localhost:4649/Echo?name=nobita"))
|
||||||
//using (var ws = new WebSocket ("ws://localhost:4649/エコー?name=のび太"))
|
|
||||||
//using (var ws = new WebSocket ("ws://localhost:4649/Chat"))
|
//using (var ws = new WebSocket ("ws://localhost:4649/Chat"))
|
||||||
//using (var ws = new WebSocket ("wss://localhost:4649/Chat"))
|
//using (var ws = new WebSocket ("wss://localhost:4649/Chat"))
|
||||||
//using (var ws = new WebSocket ("ws://localhost:4649/Chat?name=nobita"))
|
//using (var ws = new WebSocket ("ws://localhost:4649/Chat?name=nobita"))
|
||||||
//using (var ws = new WebSocket ("ws://localhost:4649/チャット?name=のび太"))
|
|
||||||
{
|
{
|
||||||
/* Setting WebSocket events */
|
/* Setting WebSocket events */
|
||||||
ws.OnOpen += (sender, e) => ws.Send ("Hi, there!");
|
ws.OnOpen += (sender, e) => ws.Send ("Hi, there!");
|
||||||
@ -67,11 +65,13 @@ namespace Example
|
|||||||
|
|
||||||
// Setting Origin header
|
// Setting Origin header
|
||||||
//ws.Origin = "http://echo.websocket.org";
|
//ws.Origin = "http://echo.websocket.org";
|
||||||
|
//ws.Origin = "http://localhost:4649";
|
||||||
|
|
||||||
// Setting Cookies
|
// Setting Cookies
|
||||||
//ws.SetCookie (new Cookie ("nobita", "\"idiot, gunfighter\""));
|
//ws.SetCookie (new Cookie ("name", "nobita"));
|
||||||
//ws.SetCookie (new Cookie ("dora", "tanuki"));
|
//ws.SetCookie (new Cookie ("role", "\"idiot, gunfighter\""));
|
||||||
|
|
||||||
|
// Connecting to the server
|
||||||
ws.Connect ();
|
ws.Connect ();
|
||||||
//ws.ConnectAsync ();
|
//ws.ConnectAsync ();
|
||||||
|
|
||||||
@ -83,6 +83,7 @@ namespace Example
|
|||||||
if (msg == "exit")
|
if (msg == "exit")
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Sending a text message
|
||||||
ws.Send (msg);
|
ws.Send (msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user