Refactored SslStream.cs

This commit is contained in:
sta 2014-03-09 15:04:20 +09:00
parent 7cf64e4d49
commit 898ccfced6

View File

@ -4,8 +4,8 @@
* *
* The MIT License * The MIT License
* *
* Copyright (c) 2012-2013 sta.blockhead * Copyright (c) 2012-2014 sta.blockhead
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights * in the Software without restriction, including without limitation the rights
@ -15,7 +15,7 @@
* *
* The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -30,41 +30,40 @@ using System;
using System.Net.Security; using System.Net.Security;
using System.Net.Sockets; using System.Net.Sockets;
namespace WebSocketSharp.Net.Security { namespace WebSocketSharp.Net.Security
{
internal class SslStream : System.Net.Security.SslStream internal class SslStream : System.Net.Security.SslStream
{ {
#region Public Constructors #region Public Constructors
public SslStream(NetworkStream innerStream) public SslStream (NetworkStream innerStream)
: base(innerStream) : base (innerStream)
{ {
} }
public SslStream(NetworkStream innerStream, bool leaveInnerStreamOpen) public SslStream (NetworkStream innerStream, bool leaveInnerStreamOpen)
: base(innerStream, leaveInnerStreamOpen) : base (innerStream, leaveInnerStreamOpen)
{ {
} }
public SslStream( public SslStream (
NetworkStream innerStream, NetworkStream innerStream,
bool leaveInnerStreamOpen, bool leaveInnerStreamOpen,
RemoteCertificateValidationCallback userCertificateValidationCallback RemoteCertificateValidationCallback userCertificateValidationCallback)
) : base(innerStream, leaveInnerStreamOpen, userCertificateValidationCallback) : base (innerStream, leaveInnerStreamOpen, userCertificateValidationCallback)
{ {
} }
public SslStream( public SslStream (
NetworkStream innerStream, NetworkStream innerStream,
bool leaveInnerStreamOpen, bool leaveInnerStreamOpen,
RemoteCertificateValidationCallback userCertificateValidationCallback, RemoteCertificateValidationCallback userCertificateValidationCallback,
LocalCertificateSelectionCallback userCertificateSelectionCallback LocalCertificateSelectionCallback userCertificateSelectionCallback)
) : base( : base (
innerStream, innerStream,
leaveInnerStreamOpen, leaveInnerStreamOpen,
userCertificateValidationCallback, userCertificateValidationCallback,
userCertificateSelectionCallback userCertificateSelectionCallback)
)
{ {
} }
@ -74,7 +73,7 @@ namespace WebSocketSharp.Net.Security {
public bool DataAvailable { public bool DataAvailable {
get { get {
return ((NetworkStream)InnerStream).DataAvailable; return ((NetworkStream) InnerStream).DataAvailable;
} }
} }