|
|
|
@ -1244,15 +1244,15 @@ namespace WebSocketSharp
|
|
|
|
// As client
|
|
|
|
// As client
|
|
|
|
private void setClientStream ()
|
|
|
|
private void setClientStream ()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var proxy = _proxyUri != null;
|
|
|
|
if (_proxyUri != null) {
|
|
|
|
_tcpClient = proxy
|
|
|
|
_tcpClient = new TcpClient (_proxyUri.DnsSafeHost, _proxyUri.Port);
|
|
|
|
? new TcpClient (_proxyUri.DnsSafeHost, _proxyUri.Port)
|
|
|
|
_stream = _tcpClient.GetStream ();
|
|
|
|
: new TcpClient (_uri.DnsSafeHost, _uri.Port);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_stream = _tcpClient.GetStream ();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (proxy)
|
|
|
|
|
|
|
|
sendProxyConnectRequest ();
|
|
|
|
sendProxyConnectRequest ();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
_tcpClient = new TcpClient (_uri.DnsSafeHost, _uri.Port);
|
|
|
|
|
|
|
|
_stream = _tcpClient.GetStream ();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_secure) {
|
|
|
|
if (_secure) {
|
|
|
|
var sslStream = new SslStream (
|
|
|
|
var sslStream = new SslStream (
|
|
|
|
|