Fix due to the renamed WebSocketServer<T> to WebSocketServiceHost<T>

This commit is contained in:
sta
2012-10-23 15:39:31 +09:00
parent c55b5d6479
commit 2ae1d35d03
38 changed files with 387 additions and 249 deletions

View File

@@ -2,22 +2,27 @@ using System;
using WebSocketSharp;
using WebSocketSharp.Server;
namespace Example3
{
namespace Example3 {
public class Chat : WebSocketService
{
private static object _forId = new object();
private static uint _id = 0;
private static object _forNum = new object();
private static uint _num = 0;
private string _name;
private string getName()
{
lock (_forId)
return QueryString.Exists("name")
? QueryString["name"]
: "anon#" + getNum();
}
private uint getNum()
{
lock (_forNum)
{
return QueryString.Exists("name")
? QueryString["name"]
: "anon#" + (++_id);
return ++_num;
}
}

View File

@@ -2,8 +2,8 @@ using System;
using WebSocketSharp;
using WebSocketSharp.Server;
namespace Example3
{
namespace Example3 {
public class Echo : WebSocketService
{
protected override void OnMessage(object sender, MessageEventArgs e)

Binary file not shown.