Cleanup network module.
This commit is contained in:
33
Assets/Cryville/Common/Network/Http11/Https11Client.cs
Normal file
33
Assets/Cryville/Common/Network/Http11/Https11Client.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Cryville.Common.Network.Http11 {
|
||||
public class Https11Client : Http11Client {
|
||||
readonly TlsClient _tlsClient;
|
||||
|
||||
protected override Stream Stream {
|
||||
get {
|
||||
return _tlsClient.Stream;
|
||||
}
|
||||
}
|
||||
protected override string WindowsProxyProtocolName {
|
||||
get {
|
||||
return "https";
|
||||
}
|
||||
}
|
||||
|
||||
public Https11Client(Uri baseUri) : base(baseUri, 443) {
|
||||
_tlsClient = new TlsClient(RawTcpStream, baseUri.Host);
|
||||
}
|
||||
|
||||
public override void Connect() {
|
||||
base.Connect();
|
||||
_tlsClient.Connect();
|
||||
}
|
||||
|
||||
public override void Close() {
|
||||
_tlsClient.Close();
|
||||
base.Close();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user