Fix due to the modified Ext.cs, WebSocketServerBase.cs and WebSocketService.cs
This commit is contained in:
@@ -23,22 +23,22 @@ namespace Example2 {
|
||||
return Interlocked.Increment(ref _num);
|
||||
}
|
||||
|
||||
protected override void OnOpen(object sender, EventArgs e)
|
||||
protected override void OnOpen()
|
||||
{
|
||||
_name = getName();
|
||||
}
|
||||
|
||||
protected override void OnMessage(object sender, MessageEventArgs e)
|
||||
protected override void OnMessage(MessageEventArgs e)
|
||||
{
|
||||
|
||||
var msg = String.Format("{0}: {1}", _name, e.Data);
|
||||
Publish(msg);
|
||||
Broadcast(msg);
|
||||
}
|
||||
|
||||
protected override void OnClose(object sender, CloseEventArgs e)
|
||||
protected override void OnClose(CloseEventArgs e)
|
||||
{
|
||||
var msg = String.Format("{0} got logged off...", _name);
|
||||
Publish(msg);
|
||||
Broadcast(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ namespace Example2 {
|
||||
|
||||
public class Echo : WebSocketService
|
||||
{
|
||||
protected override void OnMessage(object sender, MessageEventArgs e)
|
||||
protected override void OnMessage(MessageEventArgs e)
|
||||
{
|
||||
var msg = QueryString.Exists("name")
|
||||
? String.Format("'{0}' returns to {1}", e.Data, QueryString["name"])
|
||||
|
Binary file not shown.
@@ -40,7 +40,7 @@ namespace Example2
|
||||
wssv.Start();
|
||||
Console.WriteLine(
|
||||
"WebSocket Server listening on port: {0} service path:", wssv.Port);
|
||||
foreach (var path in wssv.ServicePath)
|
||||
foreach (var path in wssv.ServicePaths)
|
||||
Console.WriteLine(" {0}", path);
|
||||
Console.WriteLine();
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user