Renamed Handshake.cs to HandshakeBase.cs
This commit is contained in:
parent
68d1a7b9ba
commit
3b009b852d
@ -1,6 +1,6 @@
|
|||||||
#region License
|
#region License
|
||||||
/*
|
/*
|
||||||
* Handshake.cs
|
* HandshakeBase.cs
|
||||||
*
|
*
|
||||||
* The MIT License
|
* The MIT License
|
||||||
*
|
*
|
||||||
@ -31,10 +31,10 @@ using System.Collections.Specialized;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using WebSocketSharp.Net;
|
using WebSocketSharp.Net;
|
||||||
|
|
||||||
namespace WebSocketSharp {
|
namespace WebSocketSharp
|
||||||
|
{
|
||||||
internal abstract class Handshake {
|
internal abstract class HandshakeBase
|
||||||
|
{
|
||||||
#region Protected Const Fields
|
#region Protected Const Fields
|
||||||
|
|
||||||
protected const string CrLf = "\r\n";
|
protected const string CrLf = "\r\n";
|
||||||
@ -43,7 +43,7 @@ namespace WebSocketSharp {
|
|||||||
|
|
||||||
#region Protected Constructors
|
#region Protected Constructors
|
||||||
|
|
||||||
protected Handshake()
|
protected HandshakeBase ()
|
||||||
{
|
{
|
||||||
ProtocolVersion = HttpVersion.Version11;
|
ProtocolVersion = HttpVersion.Version11;
|
||||||
Headers = new NameValueCollection ();
|
Headers = new NameValueCollection ();
|
@ -33,9 +33,9 @@ using System.Text;
|
|||||||
using WebSocketSharp.Net;
|
using WebSocketSharp.Net;
|
||||||
using WebSocketSharp.Net.WebSockets;
|
using WebSocketSharp.Net.WebSockets;
|
||||||
|
|
||||||
namespace WebSocketSharp {
|
namespace WebSocketSharp
|
||||||
|
{
|
||||||
internal class RequestHandshake : Handshake
|
internal class RequestHandshake : HandshakeBase
|
||||||
{
|
{
|
||||||
#region Private Fields
|
#region Private Fields
|
||||||
|
|
||||||
@ -99,7 +99,6 @@ namespace WebSocketSharp {
|
|||||||
if (_queryString == null)
|
if (_queryString == null)
|
||||||
{
|
{
|
||||||
_queryString = new NameValueCollection ();
|
_queryString = new NameValueCollection ();
|
||||||
|
|
||||||
var i = RawUrl.IndexOf ('?');
|
var i = RawUrl.IndexOf ('?');
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
{
|
{
|
||||||
|
@ -31,9 +31,9 @@ using System.Collections.Specialized;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using WebSocketSharp.Net;
|
using WebSocketSharp.Net;
|
||||||
|
|
||||||
namespace WebSocketSharp {
|
namespace WebSocketSharp
|
||||||
|
{
|
||||||
internal class ResponseHandshake : Handshake
|
internal class ResponseHandshake : HandshakeBase
|
||||||
{
|
{
|
||||||
#region Public Constructors
|
#region Public Constructors
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ using System.Text;
|
|||||||
using WebSocketSharp.Net;
|
using WebSocketSharp.Net;
|
||||||
using WebSocketSharp.Net.Security;
|
using WebSocketSharp.Net.Security;
|
||||||
|
|
||||||
namespace WebSocketSharp {
|
namespace WebSocketSharp
|
||||||
|
{
|
||||||
internal class WsStream : IDisposable
|
internal class WsStream : IDisposable
|
||||||
{
|
{
|
||||||
#region Private Const Fields
|
#region Private Const Fields
|
||||||
@ -178,12 +178,10 @@ namespace WebSocketSharp {
|
|||||||
{
|
{
|
||||||
lock (_forRead)
|
lock (_forRead)
|
||||||
{
|
{
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
return WsFrame.Parse (_innerStream);
|
return WsFrame.Parse (_innerStream);
|
||||||
}
|
}
|
||||||
catch
|
catch {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,7 +225,7 @@ namespace WebSocketSharp {
|
|||||||
return write (frame.ToByteArray ());
|
return write (frame.ToByteArray ());
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool WriteHandshake(Handshake handshake)
|
public bool WriteHandshake (HandshakeBase handshake)
|
||||||
{
|
{
|
||||||
return write (handshake.ToByteArray ());
|
return write (handshake.ToByteArray ());
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,6 @@
|
|||||||
<Compile Include="WsStream.cs" />
|
<Compile Include="WsStream.cs" />
|
||||||
<Compile Include="RequestHandshake.cs" />
|
<Compile Include="RequestHandshake.cs" />
|
||||||
<Compile Include="ResponseHandshake.cs" />
|
<Compile Include="ResponseHandshake.cs" />
|
||||||
<Compile Include="Handshake.cs" />
|
|
||||||
<Compile Include="Net\AuthenticationSchemeSelector.cs" />
|
<Compile Include="Net\AuthenticationSchemeSelector.cs" />
|
||||||
<Compile Include="Net\AuthenticationSchemes.cs" />
|
<Compile Include="Net\AuthenticationSchemes.cs" />
|
||||||
<Compile Include="Net\ChunkStream.cs" />
|
<Compile Include="Net\ChunkStream.cs" />
|
||||||
@ -128,6 +127,7 @@
|
|||||||
<Compile Include="LogData.cs" />
|
<Compile Include="LogData.cs" />
|
||||||
<Compile Include="LogLevel.cs" />
|
<Compile Include="LogLevel.cs" />
|
||||||
<Compile Include="Logger.cs" />
|
<Compile Include="Logger.cs" />
|
||||||
|
<Compile Include="HandshakeBase.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user