diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-05-24 15:40:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-24 15:40:25 -0400 |
| commit | ff19fd971c3dadd716cb49366691b830d41cea26 (patch) | |
| tree | d12fde3dd5178579e71e2f268602ad642ffaebe7 /SocketHttpListener/Primitives | |
| parent | 57bce7daf3777be0ab83833d140c3bb1b13766a8 (diff) | |
| parent | 71f7fc4e116f32a20c63ddbb17844a81283a6ba4 (diff) | |
Merge pull request #2658 from MediaBrowser/dev
Dev
Diffstat (limited to 'SocketHttpListener/Primitives')
| -rw-r--r-- | SocketHttpListener/Primitives/ICertificate.cs | 12 | ||||
| -rw-r--r-- | SocketHttpListener/Primitives/IStreamFactory.cs | 18 | ||||
| -rw-r--r-- | SocketHttpListener/Primitives/ITextEncoding.cs | 17 |
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; + } + } +} |
