aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Primitives
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-05-31 15:40:34 -0400
committerGitHub <noreply@github.com>2017-05-31 15:40:34 -0400
commit91176d9ccc1dde8155c10411c70e62a9f4b059d5 (patch)
tree21365f5a8dd09534a53d9f88d2a7a3116f3f3f98 /SocketHttpListener/Primitives
parentc37c9a75073b1b9caa3af2c3bc62abd837bd630e (diff)
parent4e10daf646e0788409f2bc52ef70effa2616e3f3 (diff)
Merge pull request #2677 from MediaBrowser/beta
Beta
Diffstat (limited to 'SocketHttpListener/Primitives')
-rw-r--r--SocketHttpListener/Primitives/ICertificate.cs12
-rw-r--r--SocketHttpListener/Primitives/IStreamFactory.cs18
-rw-r--r--SocketHttpListener/Primitives/ITextEncoding.cs17
3 files changed, 47 insertions, 0 deletions
diff --git a/SocketHttpListener/Primitives/ICertificate.cs b/SocketHttpListener/Primitives/ICertificate.cs
new file mode 100644
index 000000000..1289da13d
--- /dev/null
+++ b/SocketHttpListener/Primitives/ICertificate.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SocketHttpListener.Primitives
+{
+ public interface ICertificate
+ {
+ }
+}
diff --git a/SocketHttpListener/Primitives/IStreamFactory.cs b/SocketHttpListener/Primitives/IStreamFactory.cs
new file mode 100644
index 000000000..57e21e31b
--- /dev/null
+++ b/SocketHttpListener/Primitives/IStreamFactory.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MediaBrowser.Model.Net;
+
+namespace SocketHttpListener.Primitives
+{
+ public interface IStreamFactory
+ {
+ Stream CreateNetworkStream(IAcceptSocket acceptSocket, bool ownsSocket);
+ Stream CreateSslStream(Stream innerStream, bool leaveInnerStreamOpen);
+
+ Task AuthenticateSslStreamAsServer(Stream stream, ICertificate certificate);
+ }
+}
diff --git a/SocketHttpListener/Primitives/ITextEncoding.cs b/SocketHttpListener/Primitives/ITextEncoding.cs
new file mode 100644
index 000000000..b10145687
--- /dev/null
+++ b/SocketHttpListener/Primitives/ITextEncoding.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MediaBrowser.Model.Text;
+
+namespace SocketHttpListener.Primitives
+{
+ public static class TextEncodingExtensions
+ {
+ public static Encoding GetDefaultEncoding(this ITextEncoding encoding)
+ {
+ return Encoding.UTF8;
+ }
+ }
+}