Changed IsKeepAlive to IsAlive in WebSocket.cs

This commit is contained in:
sta 2012-09-05 17:11:27 +09:00
parent 85ef38084d
commit 022368dabb
19 changed files with 13 additions and 24 deletions

Binary file not shown.

View File

@ -116,7 +116,7 @@ namespace Example
Console.Write("> "); Console.Write("> ");
data = Console.ReadLine(); data = Console.ReadLine();
if (data == "exit") if (data == "exit")
//if (data == "exit" || !ws.IsKeepAlive) //if (data == "exit" || !ws.IsAlive)
{ {
break; break;
} }

Binary file not shown.

View File

@ -84,11 +84,11 @@ namespace WebSocketSharp.Server {
} }
public WebSocketServer(int port) public WebSocketServer(int port)
: this("/", port) : this(port, "/")
{ {
} }
public WebSocketServer(string absPath, int port) public WebSocketServer(int port, string absPath)
{ {
_uri = new Uri(absPath, UriKind.Relative); _uri = new Uri(absPath, UriKind.Relative);

View File

@ -153,35 +153,29 @@ namespace WebSocketSharp
#region Properties #region Properties
public string BinaryType public string BinaryType {
{
get { return _binaryType; } get { return _binaryType; }
} }
public ulong BufferedAmount public ulong BufferedAmount {
{ get {
get
{
ulong bufferedAmount = 0; ulong bufferedAmount = 0;
lock (_unTransmittedBuffer.SyncRoot) lock (_unTransmittedBuffer.SyncRoot)
{ {
foreach (WsFrame frame in _unTransmittedBuffer) foreach (WsFrame frame in _unTransmittedBuffer)
{
bufferedAmount += frame.PayloadLength; bufferedAmount += frame.PayloadLength;
}
} }
return bufferedAmount; return bufferedAmount;
} }
} }
public string Extensions public string Extensions {
{
get { return _extensions; } get { return _extensions; }
} }
public bool IsKeepAlive { public bool IsAlive {
get { get {
if (_readyState != WsState.OPEN) if (_readyState != WsState.OPEN)
return false; return false;
@ -196,17 +190,14 @@ namespace WebSocketSharp
} }
} }
public string Protocol public string Protocol {
{
get { return _protocol; } get { return _protocol; }
} }
public WsState ReadyState public WsState ReadyState {
{
get { return _readyState; } get { return _readyState; }
private set private set {
{
_readyState = value; _readyState = value;
switch (value) switch (value)
@ -224,13 +215,11 @@ namespace WebSocketSharp
} }
} }
public SynchronizedCollection<WsFrame> UnTransmittedBuffer public SynchronizedCollection<WsFrame> UnTransmittedBuffer {
{
get { return _unTransmittedBuffer; } get { return _unTransmittedBuffer; }
} }
public string Url public string Url {
{
get { return _uri.ToString(); } get { return _uri.ToString(); }
} }

Binary file not shown.