Renamed Handshake.cs to HandshakeBase.cs

This commit is contained in:
sta 2013-08-03 14:56:00 +09:00
parent 68d1a7b9ba
commit 3b009b852d
5 changed files with 159 additions and 162 deletions

View File

@ -1,6 +1,6 @@
#region License
/*
* Handshake.cs
* HandshakeBase.cs
*
* The MIT License
*
@ -31,10 +31,10 @@ using System.Collections.Specialized;
using System.Text;
using WebSocketSharp.Net;
namespace WebSocketSharp {
internal abstract class Handshake {
namespace WebSocketSharp
{
internal abstract class HandshakeBase
{
#region Protected Const Fields
protected const string CrLf = "\r\n";
@ -43,7 +43,7 @@ namespace WebSocketSharp {
#region Protected Constructors
protected Handshake()
protected HandshakeBase ()
{
ProtocolVersion = HttpVersion.Version11;
Headers = new NameValueCollection ();

View File

@ -33,9 +33,9 @@ using System.Text;
using WebSocketSharp.Net;
using WebSocketSharp.Net.WebSockets;
namespace WebSocketSharp {
internal class RequestHandshake : Handshake
namespace WebSocketSharp
{
internal class RequestHandshake : HandshakeBase
{
#region Private Fields
@ -99,7 +99,6 @@ namespace WebSocketSharp {
if (_queryString == null)
{
_queryString = new NameValueCollection ();
var i = RawUrl.IndexOf ('?');
if (i > 0)
{

View File

@ -31,9 +31,9 @@ using System.Collections.Specialized;
using System.Text;
using WebSocketSharp.Net;
namespace WebSocketSharp {
internal class ResponseHandshake : Handshake
namespace WebSocketSharp
{
internal class ResponseHandshake : HandshakeBase
{
#region Public Constructors

View File

@ -35,8 +35,8 @@ using System.Text;
using WebSocketSharp.Net;
using WebSocketSharp.Net.Security;
namespace WebSocketSharp {
namespace WebSocketSharp
{
internal class WsStream : IDisposable
{
#region Private Const Fields
@ -178,12 +178,10 @@ namespace WebSocketSharp {
{
lock (_forRead)
{
try
{
try {
return WsFrame.Parse (_innerStream);
}
catch
{
catch {
return null;
}
}
@ -227,7 +225,7 @@ namespace WebSocketSharp {
return write (frame.ToByteArray ());
}
public bool WriteHandshake(Handshake handshake)
public bool WriteHandshake (HandshakeBase handshake)
{
return write (handshake.ToByteArray ());
}

View File

@ -74,7 +74,6 @@
<Compile Include="WsStream.cs" />
<Compile Include="RequestHandshake.cs" />
<Compile Include="ResponseHandshake.cs" />
<Compile Include="Handshake.cs" />
<Compile Include="Net\AuthenticationSchemeSelector.cs" />
<Compile Include="Net\AuthenticationSchemes.cs" />
<Compile Include="Net\ChunkStream.cs" />
@ -128,6 +127,7 @@
<Compile Include="LogData.cs" />
<Compile Include="LogLevel.cs" />
<Compile Include="Logger.cs" />
<Compile Include="HandshakeBase.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>