Fix for issue #4

master
sta 14 years ago
parent ff94d551ff
commit 475d299c3d

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.

@ -1,5 +1,5 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Release_Ubuntu" />
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />

@ -112,6 +112,30 @@ namespace WebSocketSharp
get { return _extensions; }
}
public bool IsConnected
{
get
{
if (_tcpClient == null) return false;
var socket = _tcpClient.Client;
if (!socket.Connected) return false;
if (socket.Poll(0, SelectMode.SelectWrite) &&
!socket.Poll(0, SelectMode.SelectError))
{
var buffer = new byte[1];
if (socket.Receive(buffer, SocketFlags.Peek) != 0)
{
return true;
}
}
return false;
}
}
public string Protocol
{
get { return _protocol; }

Loading…
Cancel
Save