Added some XML documentation comments
This commit is contained in:
parent
a9d5e06166
commit
8232c95cd8
@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// ChunkStream.cs
|
// ChunkStream.cs
|
||||||
// Copied from System.Net.ChunkStream
|
// Copied from System.Net.ChunkStream.cs
|
||||||
//
|
//
|
||||||
// Authors:
|
// Authors:
|
||||||
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
|
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
|
||||||
@ -28,7 +28,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
@ -39,6 +39,7 @@ namespace WebSocketSharp.Net {
|
|||||||
class ChunkStream {
|
class ChunkStream {
|
||||||
|
|
||||||
enum State {
|
enum State {
|
||||||
|
|
||||||
None,
|
None,
|
||||||
Body,
|
Body,
|
||||||
BodyFinished,
|
BodyFinished,
|
||||||
@ -46,6 +47,7 @@ namespace WebSocketSharp.Net {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Chunk {
|
class Chunk {
|
||||||
|
|
||||||
public byte [] Bytes;
|
public byte [] Bytes;
|
||||||
public int Offset;
|
public int Offset;
|
||||||
|
|
||||||
@ -63,16 +65,26 @@ namespace WebSocketSharp.Net {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal WebHeaderCollection headers;
|
#region Private Fields
|
||||||
int chunkSize;
|
|
||||||
int chunkRead;
|
int chunkRead;
|
||||||
State state;
|
List<Chunk> chunks;
|
||||||
//byte [] waitBuffer;
|
int chunkSize;
|
||||||
|
bool gotit;
|
||||||
StringBuilder saved;
|
StringBuilder saved;
|
||||||
bool sawCR;
|
bool sawCR;
|
||||||
bool gotit;
|
State state;
|
||||||
int trailerState;
|
int trailerState;
|
||||||
ArrayList chunks;
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Internal Fields
|
||||||
|
|
||||||
|
internal WebHeaderCollection headers;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructors
|
||||||
|
|
||||||
public ChunkStream (byte [] buffer, int offset, int size, WebHeaderCollection headers)
|
public ChunkStream (byte [] buffer, int offset, int size, WebHeaderCollection headers)
|
||||||
: this (headers)
|
: this (headers)
|
||||||
@ -84,54 +96,80 @@ namespace WebSocketSharp.Net {
|
|||||||
{
|
{
|
||||||
this.headers = headers;
|
this.headers = headers;
|
||||||
saved = new StringBuilder ();
|
saved = new StringBuilder ();
|
||||||
chunks = new ArrayList ();
|
chunks = new List<Chunk> ();
|
||||||
chunkSize = -1;
|
chunkSize = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetBuffer ()
|
#endregion
|
||||||
{
|
|
||||||
chunkSize = -1;
|
#region Properties
|
||||||
chunkRead = 0;
|
|
||||||
chunks.Clear ();
|
public int ChunkLeft {
|
||||||
|
get { return chunkSize - chunkRead; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void WriteAndReadBack (byte [] buffer, int offset, int size, ref int read)
|
public bool WantMore {
|
||||||
{
|
get { return (chunkRead != chunkSize || chunkSize != 0 || state != State.None); }
|
||||||
if (offset + read > 0)
|
|
||||||
Write (buffer, offset, offset+read);
|
|
||||||
read = Read (buffer, offset, size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Read (byte [] buffer, int offset, int size)
|
#endregion
|
||||||
{
|
|
||||||
return ReadFromChunks (buffer, offset, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
int ReadFromChunks (byte [] buffer, int offset, int size)
|
#region Private Methods
|
||||||
{
|
|
||||||
int count = chunks.Count;
|
|
||||||
int nread = 0;
|
|
||||||
for (int i = 0; i < count; i++) {
|
|
||||||
Chunk chunk = (Chunk) chunks [i];
|
|
||||||
if (chunk == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (chunk.Offset == chunk.Bytes.Length) {
|
State GetChunkSize (byte [] buffer, ref int offset, int size)
|
||||||
chunks [i] = null;
|
{
|
||||||
|
char c = '\0';
|
||||||
|
while (offset < size) {
|
||||||
|
c = (char) buffer [offset++];
|
||||||
|
if (c == '\r') {
|
||||||
|
if (sawCR)
|
||||||
|
ThrowProtocolViolation ("2 CR found.");
|
||||||
|
|
||||||
|
sawCR = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
nread += chunk.Read (buffer, offset + nread, size - nread);
|
if (sawCR && c == '\n')
|
||||||
if (nread == size)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (c == ' ')
|
||||||
|
gotit = true;
|
||||||
|
|
||||||
|
if (!gotit)
|
||||||
|
saved.Append (c);
|
||||||
|
|
||||||
|
if (saved.Length > 20)
|
||||||
|
ThrowProtocolViolation ("Chunk size too long.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return nread;
|
if (!sawCR || c != '\n') {
|
||||||
|
if (offset < size)
|
||||||
|
ThrowProtocolViolation ("Missing \\n.");
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (saved.Length > 0) {
|
||||||
|
chunkSize = Int32.Parse (RemoveChunkExtension (saved.ToString ()), NumberStyles.HexNumber);
|
||||||
|
}
|
||||||
|
} catch (Exception) {
|
||||||
|
ThrowProtocolViolation ("Cannot parse chunk size.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Write (byte [] buffer, int offset, int size)
|
return State.None;
|
||||||
{
|
}
|
||||||
InternalWrite (buffer, ref offset, size);
|
|
||||||
|
chunkRead = 0;
|
||||||
|
try {
|
||||||
|
chunkSize = Int32.Parse (RemoveChunkExtension (saved.ToString ()), NumberStyles.HexNumber);
|
||||||
|
} catch (Exception) {
|
||||||
|
ThrowProtocolViolation ("Cannot parse chunk size.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chunkSize == 0) {
|
||||||
|
trailerState = 2;
|
||||||
|
return State.Trailer;
|
||||||
|
}
|
||||||
|
|
||||||
|
return State.Body;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternalWrite (byte [] buffer, ref int offset, int size)
|
void InternalWrite (byte [] buffer, ref int offset, int size)
|
||||||
@ -174,14 +212,6 @@ namespace WebSocketSharp.Net {
|
|||||||
InternalWrite (buffer, ref offset, size);
|
InternalWrite (buffer, ref offset, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool WantMore {
|
|
||||||
get { return (chunkRead != chunkSize || chunkSize != 0 || state != State.None); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public int ChunkLeft {
|
|
||||||
get { return chunkSize - chunkRead; }
|
|
||||||
}
|
|
||||||
|
|
||||||
State ReadBody (byte [] buffer, ref int offset, int size)
|
State ReadBody (byte [] buffer, ref int offset, int size)
|
||||||
{
|
{
|
||||||
if (chunkSize == 0)
|
if (chunkSize == 0)
|
||||||
@ -197,78 +227,13 @@ namespace WebSocketSharp.Net {
|
|||||||
offset += diff;
|
offset += diff;
|
||||||
chunkRead += diff;
|
chunkRead += diff;
|
||||||
return (chunkRead == chunkSize) ? State.BodyFinished : State.Body;
|
return (chunkRead == chunkSize) ? State.BodyFinished : State.Body;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
State GetChunkSize (byte [] buffer, ref int offset, int size)
|
|
||||||
{
|
|
||||||
char c = '\0';
|
|
||||||
while (offset < size) {
|
|
||||||
c = (char) buffer [offset++];
|
|
||||||
if (c == '\r') {
|
|
||||||
if (sawCR)
|
|
||||||
ThrowProtocolViolation ("2 CR found");
|
|
||||||
|
|
||||||
sawCR = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sawCR && c == '\n')
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (c == ' ')
|
|
||||||
gotit = true;
|
|
||||||
|
|
||||||
if (!gotit)
|
|
||||||
saved.Append (c);
|
|
||||||
|
|
||||||
if (saved.Length > 20)
|
|
||||||
ThrowProtocolViolation ("chunk size too long.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sawCR || c != '\n') {
|
|
||||||
if (offset < size)
|
|
||||||
ThrowProtocolViolation ("Missing \\n");
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (saved.Length > 0) {
|
|
||||||
chunkSize = Int32.Parse (RemoveChunkExtension (saved.ToString ()), NumberStyles.HexNumber);
|
|
||||||
}
|
|
||||||
} catch (Exception) {
|
|
||||||
ThrowProtocolViolation ("Cannot parse chunk size.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return State.None;
|
|
||||||
}
|
|
||||||
|
|
||||||
chunkRead = 0;
|
|
||||||
try {
|
|
||||||
chunkSize = Int32.Parse (RemoveChunkExtension (saved.ToString ()), NumberStyles.HexNumber);
|
|
||||||
} catch (Exception) {
|
|
||||||
ThrowProtocolViolation ("Cannot parse chunk size.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (chunkSize == 0) {
|
|
||||||
trailerState = 2;
|
|
||||||
return State.Trailer;
|
|
||||||
}
|
|
||||||
|
|
||||||
return State.Body;
|
|
||||||
}
|
|
||||||
|
|
||||||
static string RemoveChunkExtension (string input)
|
|
||||||
{
|
|
||||||
int idx = input.IndexOf (';');
|
|
||||||
if (idx == -1)
|
|
||||||
return input;
|
|
||||||
return input.Substring (0, idx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
State ReadCRLF (byte [] buffer, ref int offset, int size)
|
State ReadCRLF (byte [] buffer, ref int offset, int size)
|
||||||
{
|
{
|
||||||
if (!sawCR) {
|
if (!sawCR) {
|
||||||
if ((char) buffer [offset++] != '\r')
|
if ((char) buffer [offset++] != '\r')
|
||||||
ThrowProtocolViolation ("Expecting \\r");
|
ThrowProtocolViolation ("Expecting \\r.");
|
||||||
|
|
||||||
sawCR = true;
|
sawCR = true;
|
||||||
if (offset == size)
|
if (offset == size)
|
||||||
@ -276,11 +241,33 @@ namespace WebSocketSharp.Net {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sawCR && (char) buffer [offset++] != '\n')
|
if (sawCR && (char) buffer [offset++] != '\n')
|
||||||
ThrowProtocolViolation ("Expecting \\n");
|
ThrowProtocolViolation ("Expecting \\n.");
|
||||||
|
|
||||||
return State.None;
|
return State.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ReadFromChunks (byte [] buffer, int offset, int size)
|
||||||
|
{
|
||||||
|
int count = chunks.Count;
|
||||||
|
int nread = 0;
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
var chunk = chunks [i];
|
||||||
|
if (chunk == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (chunk.Offset == chunk.Bytes.Length) {
|
||||||
|
chunks [i] = null;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
nread += chunk.Read (buffer, offset + nread, size - nread);
|
||||||
|
if (nread == size)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nread;
|
||||||
|
}
|
||||||
|
|
||||||
State ReadTrailer (byte [] buffer, ref int offset, int size)
|
State ReadTrailer (byte [] buffer, ref int offset, int size)
|
||||||
{
|
{
|
||||||
char c = '\0';
|
char c = '\0';
|
||||||
@ -292,6 +279,7 @@ namespace WebSocketSharp.Net {
|
|||||||
offset++;
|
offset++;
|
||||||
return State.None;
|
return State.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset--;
|
offset--;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,7 +313,7 @@ namespace WebSocketSharp.Net {
|
|||||||
return State.Trailer;
|
return State.Trailer;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringReader reader = new StringReader (saved.ToString ());
|
var reader = new StringReader (saved.ToString ());
|
||||||
string line;
|
string line;
|
||||||
while ((line = reader.ReadLine ()) != null && line != "")
|
while ((line = reader.ReadLine ()) != null && line != "")
|
||||||
headers.Add (line);
|
headers.Add (line);
|
||||||
@ -333,10 +321,50 @@ namespace WebSocketSharp.Net {
|
|||||||
return State.None;
|
return State.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static string RemoveChunkExtension (string input)
|
||||||
|
{
|
||||||
|
int idx = input.IndexOf (';');
|
||||||
|
if (idx == -1)
|
||||||
|
return input;
|
||||||
|
|
||||||
|
return input.Substring (0, idx);
|
||||||
|
}
|
||||||
|
|
||||||
static void ThrowProtocolViolation (string message)
|
static void ThrowProtocolViolation (string message)
|
||||||
{
|
{
|
||||||
WebException we = new WebException (message, null, WebExceptionStatus.ServerProtocolViolation, null);
|
var we = new WebException (message, null, WebExceptionStatus.ServerProtocolViolation, null);
|
||||||
throw we;
|
throw we;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
|
public int Read (byte [] buffer, int offset, int size)
|
||||||
|
{
|
||||||
|
return ReadFromChunks (buffer, offset, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResetBuffer ()
|
||||||
|
{
|
||||||
|
chunkSize = -1;
|
||||||
|
chunkRead = 0;
|
||||||
|
chunks.Clear ();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Write (byte [] buffer, int offset, int size)
|
||||||
|
{
|
||||||
|
InternalWrite (buffer, ref offset, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void WriteAndReadBack (byte [] buffer, int offset, int size, ref int read)
|
||||||
|
{
|
||||||
|
if (offset + read > 0)
|
||||||
|
Write (buffer, offset, offset + read);
|
||||||
|
|
||||||
|
read = Read (buffer, offset, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// ChunkedInputStream.cs
|
// ChunkedInputStream.cs
|
||||||
// Copied from System.Net.ChunkedInputStream
|
// Copied from System.Net.ChunkedInputStream.cs
|
||||||
//
|
//
|
||||||
// Authors:
|
// Authors:
|
||||||
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
||||||
@ -25,21 +25,15 @@
|
|||||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace WebSocketSharp.Net {
|
namespace WebSocketSharp.Net {
|
||||||
|
|
||||||
class ChunkedInputStream : RequestStream
|
class ChunkedInputStream : RequestStream {
|
||||||
{
|
|
||||||
HttpListenerContext context;
|
|
||||||
ChunkStream decoder;
|
|
||||||
bool disposed;
|
|
||||||
bool no_more_data;
|
|
||||||
|
|
||||||
class ReadBufferState {
|
class ReadBufferState {
|
||||||
|
|
||||||
@ -60,6 +54,17 @@ namespace WebSocketSharp.Net {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Fields
|
||||||
|
|
||||||
|
HttpListenerContext context;
|
||||||
|
ChunkStream decoder;
|
||||||
|
bool disposed;
|
||||||
|
bool no_more_data;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
|
||||||
public ChunkedInputStream (
|
public ChunkedInputStream (
|
||||||
HttpListenerContext context, Stream stream, byte [] buffer, int offset, int length)
|
HttpListenerContext context, Stream stream, byte [] buffer, int offset, int length)
|
||||||
: base (stream, buffer, offset, length)
|
: base (stream, buffer, offset, length)
|
||||||
@ -69,15 +74,23 @@ namespace WebSocketSharp.Net {
|
|||||||
decoder = new ChunkStream (coll);
|
decoder = new ChunkStream (coll);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Property
|
||||||
|
|
||||||
public ChunkStream Decoder {
|
public ChunkStream Decoder {
|
||||||
get { return decoder; }
|
get { return decoder; }
|
||||||
set { decoder = value; }
|
set { decoder = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Private Method
|
||||||
|
|
||||||
void OnRead (IAsyncResult base_ares)
|
void OnRead (IAsyncResult base_ares)
|
||||||
{
|
{
|
||||||
ReadBufferState rb = (ReadBufferState) base_ares.AsyncState;
|
var rb = (ReadBufferState) base_ares.AsyncState;
|
||||||
HttpStreamAsyncResult ares = rb.Ares;
|
var ares = rb.Ares;
|
||||||
try {
|
try {
|
||||||
int nread = base.EndRead (base_ares);
|
int nread = base.EndRead (base_ares);
|
||||||
decoder.Write (ares.Buffer, ares.Offset, nread);
|
decoder.Write (ares.Buffer, ares.Offset, nread);
|
||||||
@ -90,6 +103,7 @@ namespace WebSocketSharp.Net {
|
|||||||
ares.Complete ();
|
ares.Complete ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ares.Offset = 0;
|
ares.Offset = 0;
|
||||||
ares.Count = Math.Min (8192, decoder.ChunkLeft + 6);
|
ares.Count = Math.Min (8192, decoder.ChunkLeft + 6);
|
||||||
base.BeginRead (ares.Buffer, ares.Offset, ares.Count, OnRead, rb);
|
base.BeginRead (ares.Buffer, ares.Offset, ares.Count, OnRead, rb);
|
||||||
@ -99,6 +113,10 @@ namespace WebSocketSharp.Net {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
public override IAsyncResult BeginRead (
|
public override IAsyncResult BeginRead (
|
||||||
byte [] buffer, int offset, int count, AsyncCallback cback, object state)
|
byte [] buffer, int offset, int count, AsyncCallback cback, object state)
|
||||||
{
|
{
|
||||||
@ -110,18 +128,19 @@ namespace WebSocketSharp.Net {
|
|||||||
|
|
||||||
int len = buffer.Length;
|
int len = buffer.Length;
|
||||||
if (offset < 0 || offset > len)
|
if (offset < 0 || offset > len)
|
||||||
throw new ArgumentOutOfRangeException ("offset exceeds the size of buffer");
|
throw new ArgumentOutOfRangeException ("'offset' exceeds the size of buffer.");
|
||||||
|
|
||||||
if (count < 0 || offset > len - count)
|
if (count < 0 || offset > len - count)
|
||||||
throw new ArgumentOutOfRangeException ("offset+size exceeds the size of buffer");
|
throw new ArgumentOutOfRangeException ("'offset' + 'count' exceeds the size of buffer.");
|
||||||
|
|
||||||
HttpStreamAsyncResult ares = new HttpStreamAsyncResult ();
|
var ares = new HttpStreamAsyncResult ();
|
||||||
ares.Callback = cback;
|
ares.Callback = cback;
|
||||||
ares.State = state;
|
ares.State = state;
|
||||||
if (no_more_data) {
|
if (no_more_data) {
|
||||||
ares.Complete ();
|
ares.Complete ();
|
||||||
return ares;
|
return ares;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nread = decoder.Read (buffer, offset, count);
|
int nread = decoder.Read (buffer, offset, count);
|
||||||
offset += nread;
|
offset += nread;
|
||||||
count -= nread;
|
count -= nread;
|
||||||
@ -131,16 +150,18 @@ namespace WebSocketSharp.Net {
|
|||||||
ares.Complete ();
|
ares.Complete ();
|
||||||
return ares;
|
return ares;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!decoder.WantMore) {
|
if (!decoder.WantMore) {
|
||||||
no_more_data = nread == 0;
|
no_more_data = nread == 0;
|
||||||
ares.Count = nread;
|
ares.Count = nread;
|
||||||
ares.Complete ();
|
ares.Complete ();
|
||||||
return ares;
|
return ares;
|
||||||
}
|
}
|
||||||
|
|
||||||
ares.Buffer = new byte [8192];
|
ares.Buffer = new byte [8192];
|
||||||
ares.Offset = 0;
|
ares.Offset = 0;
|
||||||
ares.Count = 8192;
|
ares.Count = 8192;
|
||||||
ReadBufferState rb = new ReadBufferState (buffer, offset, count, ares);
|
var rb = new ReadBufferState (buffer, offset, count, ares);
|
||||||
rb.InitialCount += nread;
|
rb.InitialCount += nread;
|
||||||
base.BeginRead (ares.Buffer, ares.Offset, ares.Count, OnRead, rb);
|
base.BeginRead (ares.Buffer, ares.Offset, ares.Count, OnRead, rb);
|
||||||
return ares;
|
return ares;
|
||||||
@ -159,23 +180,25 @@ namespace WebSocketSharp.Net {
|
|||||||
if (disposed)
|
if (disposed)
|
||||||
throw new ObjectDisposedException (GetType ().ToString ());
|
throw new ObjectDisposedException (GetType ().ToString ());
|
||||||
|
|
||||||
HttpStreamAsyncResult my_ares = ares as HttpStreamAsyncResult;
|
|
||||||
if (ares == null)
|
if (ares == null)
|
||||||
throw new ArgumentException ("Invalid IAsyncResult", "ares");
|
throw new ArgumentException ("Invalid IAsyncResult.", "ares");
|
||||||
|
|
||||||
if (!ares.IsCompleted)
|
if (!ares.IsCompleted)
|
||||||
ares.AsyncWaitHandle.WaitOne ();
|
ares.AsyncWaitHandle.WaitOne ();
|
||||||
|
|
||||||
if (my_ares.Error != null)
|
var ares_ = ares as HttpStreamAsyncResult;
|
||||||
|
if (ares_.Error != null)
|
||||||
throw new HttpListenerException (400, "I/O operation aborted.");
|
throw new HttpListenerException (400, "I/O operation aborted.");
|
||||||
|
|
||||||
return my_ares.Count;
|
return ares_.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int Read ([In,Out] byte [] buffer, int offset, int count)
|
public override int Read ([In,Out] byte [] buffer, int offset, int count)
|
||||||
{
|
{
|
||||||
IAsyncResult ares = BeginRead (buffer, offset, count, null, null);
|
var ares = BeginRead (buffer, offset, count, null, null);
|
||||||
return EndRead (ares);
|
return EndRead (ares);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
//
|
//
|
||||||
// HttpListenerPrefixCollection.cs
|
// HttpListenerPrefixCollection.cs
|
||||||
// Copied from System.Net.HttpListenerPrefixCollection
|
// Copied from System.Net.HttpListenerPrefixCollection.cs
|
||||||
//
|
//
|
||||||
// Author:
|
// Author:
|
||||||
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
||||||
//
|
//
|
||||||
// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
|
// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
|
||||||
// Copyright (c) 2012 sta.blockhead (sta.blockhead@gmail.com)
|
// Copyright (c) 2012-2013 sta.blockhead (sta.blockhead@gmail.com)
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining
|
// Permission is hereby granted, free of charge, to any person obtaining
|
||||||
// a copy of this software and associated documentation files (the
|
// a copy of this software and associated documentation files (the
|
||||||
@ -31,38 +31,104 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
|
||||||
|
|
||||||
namespace WebSocketSharp.Net {
|
namespace WebSocketSharp.Net {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Provides the collection used to store the URI prefixes for the <see cref="HttpListener"/>.
|
||||||
|
/// </summary>
|
||||||
public class HttpListenerPrefixCollection : ICollection<string>, IEnumerable<string>, IEnumerable
|
public class HttpListenerPrefixCollection : ICollection<string>, IEnumerable<string>, IEnumerable
|
||||||
{
|
{
|
||||||
|
#region Fields
|
||||||
|
|
||||||
HttpListener listener;
|
HttpListener listener;
|
||||||
List<string> prefixes;
|
List<string> prefixes;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Private Constructor
|
||||||
|
|
||||||
private HttpListenerPrefixCollection ()
|
private HttpListenerPrefixCollection ()
|
||||||
{
|
{
|
||||||
prefixes = new List<string> ();
|
prefixes = new List<string> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Internal Constructor
|
||||||
|
|
||||||
internal HttpListenerPrefixCollection (HttpListener listener)
|
internal HttpListenerPrefixCollection (HttpListener listener)
|
||||||
: this ()
|
: this ()
|
||||||
{
|
{
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the number of prefixes contained in the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>
|
||||||
|
/// A <see cref="int"/> that contains the number of prefixes.
|
||||||
|
/// </value>
|
||||||
public int Count {
|
public int Count {
|
||||||
get { return prefixes.Count; }
|
get { return prefixes.Count; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether access to the <see cref="HttpListenerPrefixCollection"/> is read-only.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>
|
||||||
|
/// Always returns <c>false</c>.
|
||||||
|
/// </value>
|
||||||
public bool IsReadOnly {
|
public bool IsReadOnly {
|
||||||
get { return false; }
|
get { return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether access to the <see cref="HttpListenerPrefixCollection"/> is synchronized.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>
|
||||||
|
/// Always returns <c>false</c>.
|
||||||
|
/// </value>
|
||||||
public bool IsSynchronized {
|
public bool IsSynchronized {
|
||||||
get { return false; }
|
get { return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Explicit Interface Implementation
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets an object that can be used to iterate through the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>
|
||||||
|
/// An object that implements the <see cref="IEnumerator"/> interface and provides access to
|
||||||
|
/// the URI prefix strings in the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
|
/// </returns>
|
||||||
|
IEnumerator IEnumerable.GetEnumerator ()
|
||||||
|
{
|
||||||
|
return prefixes.GetEnumerator ();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds the specified <paramref name="uriPrefix"/> to the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uriPrefix">
|
||||||
|
/// A <see cref="string"/> that contains a URI prefix to add.
|
||||||
|
/// </param>
|
||||||
|
/// <exception cref="ArgumentNullException">
|
||||||
|
/// <paramref name="uriPrefix"/> is <see langword="null"/>.
|
||||||
|
/// </exception>
|
||||||
|
/// <exception cref="ObjectDisposedException">
|
||||||
|
/// The <see cref="HttpListener"/> associated with this <see cref="HttpListenerPrefixCollection"/> is closed.
|
||||||
|
/// </exception>
|
||||||
public void Add (string uriPrefix)
|
public void Add (string uriPrefix)
|
||||||
{
|
{
|
||||||
listener.CheckDisposed ();
|
listener.CheckDisposed ();
|
||||||
@ -75,6 +141,12 @@ namespace WebSocketSharp.Net {
|
|||||||
EndPointManager.AddPrefix (uriPrefix, listener);
|
EndPointManager.AddPrefix (uriPrefix, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes all URI prefixes from the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="ObjectDisposedException">
|
||||||
|
/// The <see cref="HttpListener"/> associated with this <see cref="HttpListenerPrefixCollection"/> is closed.
|
||||||
|
/// </exception>
|
||||||
public void Clear ()
|
public void Clear ()
|
||||||
{
|
{
|
||||||
listener.CheckDisposed ();
|
listener.CheckDisposed ();
|
||||||
@ -83,34 +155,96 @@ namespace WebSocketSharp.Net {
|
|||||||
EndPointManager.RemoveListener (listener);
|
EndPointManager.RemoveListener (listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a value indicating whether the <see cref="HttpListenerPrefixCollection"/> contains
|
||||||
|
/// the specified <paramref name="uriPrefix"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>
|
||||||
|
/// <c>true</c> if the <see cref="HttpListenerPrefixCollection"/> contains the specified <paramref name="uriPrefix"/>;
|
||||||
|
/// otherwise, <c>false</c>.
|
||||||
|
/// </returns>
|
||||||
|
/// <param name="uriPrefix">
|
||||||
|
/// A <see cref="string"/> that contains a URI prefix to test.
|
||||||
|
/// </param>
|
||||||
|
/// <exception cref="ArgumentNullException">
|
||||||
|
/// <paramref name="uriPrefix"/> is <see langword="null"/>.
|
||||||
|
/// </exception>
|
||||||
|
/// <exception cref="ObjectDisposedException">
|
||||||
|
/// The <see cref="HttpListener"/> associated with this <see cref="HttpListenerPrefixCollection"/> is closed.
|
||||||
|
/// </exception>
|
||||||
public bool Contains (string uriPrefix)
|
public bool Contains (string uriPrefix)
|
||||||
{
|
{
|
||||||
listener.CheckDisposed ();
|
listener.CheckDisposed ();
|
||||||
|
if (uriPrefix == null)
|
||||||
|
throw new ArgumentNullException ("uriPrefix");
|
||||||
|
|
||||||
return prefixes.Contains (uriPrefix);
|
return prefixes.Contains (uriPrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CopyTo (string [] array, int offset)
|
/// <summary>
|
||||||
{
|
/// Copies the contents of the <see cref="HttpListenerPrefixCollection"/> to the specified <see cref="Array"/>.
|
||||||
listener.CheckDisposed ();
|
/// </summary>
|
||||||
prefixes.CopyTo (array, offset);
|
/// <param name="array">
|
||||||
}
|
/// An <see cref="Array"/> that receives the URI prefix strings in the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
|
/// </param>
|
||||||
|
/// <param name="offset">
|
||||||
|
/// An <see cref="int"/> that contains the zero-based index in <paramref name="array"/> at which copying begins.
|
||||||
|
/// </param>
|
||||||
|
/// <exception cref="ObjectDisposedException">
|
||||||
|
/// The <see cref="HttpListener"/> associated with this <see cref="HttpListenerPrefixCollection"/> is closed.
|
||||||
|
/// </exception>
|
||||||
public void CopyTo (Array array, int offset)
|
public void CopyTo (Array array, int offset)
|
||||||
{
|
{
|
||||||
listener.CheckDisposed ();
|
listener.CheckDisposed ();
|
||||||
((ICollection) prefixes).CopyTo (array, offset);
|
((ICollection) prefixes).CopyTo (array, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Copies the contents of the <see cref="HttpListenerPrefixCollection"/> to the specified array of <see cref="string"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="array">
|
||||||
|
/// An array of <see cref="string"/> that receives the URI prefix strings in the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
|
/// </param>
|
||||||
|
/// <param name="offset">
|
||||||
|
/// An <see cref="int"/> that contains the zero-based index in <paramref name="array"/> at which copying begins.
|
||||||
|
/// </param>
|
||||||
|
/// <exception cref="ObjectDisposedException">
|
||||||
|
/// The <see cref="HttpListener"/> associated with this <see cref="HttpListenerPrefixCollection"/> is closed.
|
||||||
|
/// </exception>
|
||||||
|
public void CopyTo (string [] array, int offset)
|
||||||
|
{
|
||||||
|
listener.CheckDisposed ();
|
||||||
|
prefixes.CopyTo (array, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets an object that can be used to iterate through the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>
|
||||||
|
/// An object that implements the IEnumerator<string> interface and provides access to
|
||||||
|
/// the URI prefix strings in the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
|
/// </returns>
|
||||||
public IEnumerator<string> GetEnumerator ()
|
public IEnumerator<string> GetEnumerator ()
|
||||||
{
|
{
|
||||||
return prefixes.GetEnumerator ();
|
return prefixes.GetEnumerator ();
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator IEnumerable.GetEnumerator ()
|
/// <summary>
|
||||||
{
|
/// Removes the specified <paramref name="uriPrefix"/> from the list of prefixes in the <see cref="HttpListenerPrefixCollection"/>.
|
||||||
return prefixes.GetEnumerator ();
|
/// </summary>
|
||||||
}
|
/// <returns>
|
||||||
|
/// <c>true</c> if the <paramref name="uriPrefix"/> was found in the <see cref="HttpListenerPrefixCollection"/>
|
||||||
|
/// and removed; otherwise, <c>false</c>.
|
||||||
|
/// </returns>
|
||||||
|
/// <param name="uriPrefix">
|
||||||
|
/// A <see cref="string"/> that contains a URI prefix to remove.
|
||||||
|
/// </param>
|
||||||
|
/// <exception cref="ArgumentNullException">
|
||||||
|
/// <paramref name="uriPrefix"/> is <see langword="null"/>.
|
||||||
|
/// </exception>
|
||||||
|
/// <exception cref="ObjectDisposedException">
|
||||||
|
/// The <see cref="HttpListener"/> associated with this <see cref="HttpListenerPrefixCollection"/> is closed.
|
||||||
|
/// </exception>
|
||||||
public bool Remove (string uriPrefix)
|
public bool Remove (string uriPrefix)
|
||||||
{
|
{
|
||||||
listener.CheckDisposed ();
|
listener.CheckDisposed ();
|
||||||
@ -123,5 +257,7 @@ namespace WebSocketSharp.Net {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// HttpStreamAsyncResult.cs
|
// HttpStreamAsyncResult.cs
|
||||||
// Copied from System.Net.HttpStreamAsyncResult
|
// Copied from System.Net.HttpStreamAsyncResult.cs
|
||||||
//
|
//
|
||||||
// Authors:
|
// Authors:
|
||||||
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
||||||
@ -28,24 +28,33 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace WebSocketSharp.Net {
|
namespace WebSocketSharp.Net {
|
||||||
|
|
||||||
class HttpStreamAsyncResult : IAsyncResult
|
class HttpStreamAsyncResult : IAsyncResult {
|
||||||
{
|
|
||||||
|
#region Private Fields
|
||||||
|
|
||||||
bool completed;
|
bool completed;
|
||||||
ManualResetEvent handle;
|
ManualResetEvent handle;
|
||||||
object locker = new object ();
|
object locker = new object ();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Internal Fields
|
||||||
|
|
||||||
internal AsyncCallback Callback;
|
internal AsyncCallback Callback;
|
||||||
internal int Count;
|
internal int Count;
|
||||||
internal byte [] Buffer;
|
internal byte [] Buffer;
|
||||||
internal Exception Error;
|
internal Exception Error;
|
||||||
internal int Offset;
|
internal int Offset;
|
||||||
internal object State;
|
internal object State;
|
||||||
internal int SynchRead;
|
internal int SyncRead;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
public object AsyncState {
|
public object AsyncState {
|
||||||
get { return State; }
|
get { return State; }
|
||||||
@ -63,7 +72,7 @@ namespace WebSocketSharp.Net {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public bool CompletedSynchronously {
|
public bool CompletedSynchronously {
|
||||||
get { return (SynchRead == Count); }
|
get { return (SyncRead == Count); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsCompleted {
|
public bool IsCompleted {
|
||||||
@ -74,6 +83,10 @@ namespace WebSocketSharp.Net {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
public void Complete ()
|
public void Complete ()
|
||||||
{
|
{
|
||||||
lock (locker) {
|
lock (locker) {
|
||||||
@ -94,5 +107,7 @@ namespace WebSocketSharp.Net {
|
|||||||
Error = e;
|
Error = e;
|
||||||
Complete ();
|
Complete ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// ListenerPrefix.cs
|
// ListenerPrefix.cs
|
||||||
// Copied from System.ListenerPrefix
|
// Copied from System.ListenerPrefix.cs
|
||||||
//
|
//
|
||||||
// Author:
|
// Author:
|
||||||
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
||||||
@ -35,6 +35,8 @@ namespace WebSocketSharp.Net {
|
|||||||
|
|
||||||
sealed class ListenerPrefix {
|
sealed class ListenerPrefix {
|
||||||
|
|
||||||
|
#region Private Fields
|
||||||
|
|
||||||
IPAddress [] addresses;
|
IPAddress [] addresses;
|
||||||
string host;
|
string host;
|
||||||
string original;
|
string original;
|
||||||
@ -42,14 +44,27 @@ namespace WebSocketSharp.Net {
|
|||||||
ushort port;
|
ushort port;
|
||||||
bool secure;
|
bool secure;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public Field
|
||||||
|
|
||||||
public HttpListener Listener;
|
public HttpListener Listener;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
|
||||||
|
// Must be called after calling ListenerPrefix.CheckUri.
|
||||||
public ListenerPrefix (string prefix)
|
public ListenerPrefix (string prefix)
|
||||||
{
|
{
|
||||||
original = prefix;
|
original = prefix;
|
||||||
Parse (prefix);
|
Parse (prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
public IPAddress [] Addresses {
|
public IPAddress [] Addresses {
|
||||||
get { return addresses; }
|
get { return addresses; }
|
||||||
set { addresses = value; }
|
set { addresses = value; }
|
||||||
@ -71,19 +86,18 @@ namespace WebSocketSharp.Net {
|
|||||||
get { return secure; }
|
get { return secure; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Private Method
|
||||||
|
|
||||||
void Parse (string uri)
|
void Parse (string uri)
|
||||||
{
|
{
|
||||||
int default_port = (uri.StartsWith ("http://")) ? 80 : -1;
|
int default_port = (uri.StartsWith ("http://")) ? 80 : 443;
|
||||||
if (default_port == -1) {
|
if (default_port == 443)
|
||||||
default_port = (uri.StartsWith ("https://")) ? 443 : -1;
|
|
||||||
secure = true;
|
secure = true;
|
||||||
}
|
|
||||||
|
|
||||||
int length = uri.Length;
|
int length = uri.Length;
|
||||||
int start_host = uri.IndexOf (':') + 3;
|
int start_host = uri.IndexOf (':') + 3;
|
||||||
if (start_host >= length)
|
|
||||||
throw new ArgumentException ("No host specified.");
|
|
||||||
|
|
||||||
int colon = uri.IndexOf (':', start_host, length - start_host);
|
int colon = uri.IndexOf (':', start_host, length - start_host);
|
||||||
int root;
|
int root;
|
||||||
if (colon > 0) {
|
if (colon > 0) {
|
||||||
@ -95,15 +109,21 @@ namespace WebSocketSharp.Net {
|
|||||||
root = uri.IndexOf ('/', start_host, length - start_host);
|
root = uri.IndexOf ('/', start_host, length - start_host);
|
||||||
host = uri.Substring (start_host, root - start_host);
|
host = uri.Substring (start_host, root - start_host);
|
||||||
path = uri.Substring (root);
|
path = uri.Substring (root);
|
||||||
|
port = (ushort) default_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.Length != 1)
|
if (path.Length != 1)
|
||||||
path = path.Substring (0, path.Length - 1);
|
path = path.Substring (0, path.Length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public Methods
|
||||||
|
|
||||||
public static void CheckUri (string uri)
|
public static void CheckUri (string uri)
|
||||||
{
|
{
|
||||||
if (uri == null)
|
if (uri == null)
|
||||||
throw new ArgumentNullException ("uriPrefix");
|
throw new ArgumentNullException ("uri");
|
||||||
|
|
||||||
int default_port = (uri.StartsWith ("http://")) ? 80 : -1;
|
int default_port = (uri.StartsWith ("http://")) ? 80 : -1;
|
||||||
if (default_port == -1)
|
if (default_port == -1)
|
||||||
@ -140,13 +160,13 @@ namespace WebSocketSharp.Net {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (uri [uri.Length - 1] != '/')
|
if (uri [uri.Length - 1] != '/')
|
||||||
throw new ArgumentException ("The prefix must end with '/'");
|
throw new ArgumentException ("The prefix must end with '/'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Equals and GetHashCode are required to detect duplicates in HttpListenerPrefixCollection.
|
// Equals and GetHashCode are required to detect duplicates in HttpListenerPrefixCollection.
|
||||||
public override bool Equals (object o)
|
public override bool Equals (object o)
|
||||||
{
|
{
|
||||||
ListenerPrefix other = o as ListenerPrefix;
|
var other = o as ListenerPrefix;
|
||||||
if (other == null)
|
if (other == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -162,5 +182,7 @@ namespace WebSocketSharp.Net {
|
|||||||
{
|
{
|
||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// RequestStream.cs
|
// RequestStream.cs
|
||||||
// Copied from System.Net.RequestStream
|
// Copied from System.Net.RequestStream.cs
|
||||||
//
|
//
|
||||||
// Author:
|
// Author:
|
||||||
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
// Gonzalo Paniagua Javier (gonzalo@novell.com)
|
||||||
@ -29,27 +29,31 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace WebSocketSharp.Net {
|
namespace WebSocketSharp.Net {
|
||||||
|
|
||||||
class RequestStream : Stream
|
class RequestStream : Stream {
|
||||||
{
|
|
||||||
byte [] buffer;
|
|
||||||
int offset;
|
|
||||||
int length;
|
|
||||||
long remaining_body;
|
|
||||||
bool disposed;
|
|
||||||
System.IO.Stream stream;
|
|
||||||
|
|
||||||
internal RequestStream (System.IO.Stream stream, byte [] buffer, int offset, int length)
|
#region Fields
|
||||||
|
|
||||||
|
byte [] buffer;
|
||||||
|
bool disposed;
|
||||||
|
int length;
|
||||||
|
int offset;
|
||||||
|
long remaining_body;
|
||||||
|
Stream stream;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructors
|
||||||
|
|
||||||
|
internal RequestStream (Stream stream, byte [] buffer, int offset, int length)
|
||||||
: this (stream, buffer, offset, length, -1)
|
: this (stream, buffer, offset, length, -1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
internal RequestStream (System.IO.Stream stream, byte [] buffer, int offset, int length, long contentlength)
|
internal RequestStream (Stream stream, byte [] buffer, int offset, int length, long contentlength)
|
||||||
{
|
{
|
||||||
this.stream = stream;
|
this.stream = stream;
|
||||||
this.buffer = buffer;
|
this.buffer = buffer;
|
||||||
@ -58,6 +62,10 @@ namespace WebSocketSharp.Net {
|
|||||||
this.remaining_body = contentlength;
|
this.remaining_body = contentlength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
public override bool CanRead {
|
public override bool CanRead {
|
||||||
get { return true; }
|
get { return true; }
|
||||||
}
|
}
|
||||||
@ -79,33 +87,30 @@ namespace WebSocketSharp.Net {
|
|||||||
set { throw new NotSupportedException (); }
|
set { throw new NotSupportedException (); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public override void Close ()
|
#region Private Method
|
||||||
{
|
|
||||||
disposed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Flush ()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Returns 0 if we can keep reading from the base stream,
|
// Returns 0 if we can keep reading from the base stream,
|
||||||
// > 0 if we read something from the buffer.
|
// > 0 if we read something from the buffer.
|
||||||
// -1 if we had a content length set and we finished reading that many bytes.
|
// -1 if we had a content length set and we finished reading that many bytes.
|
||||||
int FillFromBuffer (byte [] buffer, int off, int count)
|
int FillFromBuffer (byte [] buffer, int offset, int count)
|
||||||
{
|
{
|
||||||
if (buffer == null)
|
if (buffer == null)
|
||||||
throw new ArgumentNullException ("buffer");
|
throw new ArgumentNullException ("buffer");
|
||||||
if (off < 0)
|
|
||||||
|
if (offset < 0)
|
||||||
throw new ArgumentOutOfRangeException ("offset", "< 0");
|
throw new ArgumentOutOfRangeException ("offset", "< 0");
|
||||||
|
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
throw new ArgumentOutOfRangeException ("count", "< 0");
|
throw new ArgumentOutOfRangeException ("count", "< 0");
|
||||||
|
|
||||||
int len = buffer.Length;
|
int len = buffer.Length;
|
||||||
if (off > len)
|
if (offset > len)
|
||||||
throw new ArgumentException ("destination offset is beyond array size");
|
throw new ArgumentException ("Destination offset is beyond array size.");
|
||||||
if (off > len - count)
|
|
||||||
throw new ArgumentException ("Reading would overrun buffer");
|
if (offset > len - count)
|
||||||
|
throw new ArgumentException ("Reading would overrun buffer.");
|
||||||
|
|
||||||
if (this.remaining_body == 0)
|
if (this.remaining_body == 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -120,21 +125,98 @@ namespace WebSocketSharp.Net {
|
|||||||
if (this.offset > this.buffer.Length - size) {
|
if (this.offset > this.buffer.Length - size) {
|
||||||
size = Math.Min (size, this.buffer.Length - this.offset);
|
size = Math.Min (size, this.buffer.Length - this.offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
Buffer.BlockCopy (this.buffer, this.offset, buffer, off, size);
|
Buffer.BlockCopy (this.buffer, this.offset, buffer, offset, size);
|
||||||
this.offset += size;
|
this.offset += size;
|
||||||
this.length -= size;
|
this.length -= size;
|
||||||
if (this.remaining_body > 0)
|
if (this.remaining_body > 0)
|
||||||
remaining_body -= size;
|
remaining_body -= size;
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
|
public override IAsyncResult BeginRead (
|
||||||
|
byte [] buffer, int offset, int count, AsyncCallback cback, object state)
|
||||||
|
{
|
||||||
|
if (disposed)
|
||||||
|
throw new ObjectDisposedException (GetType ().ToString ());
|
||||||
|
|
||||||
|
int nread = FillFromBuffer (buffer, offset, count);
|
||||||
|
if (nread > 0 || nread == -1) {
|
||||||
|
var ares = new HttpStreamAsyncResult ();
|
||||||
|
ares.Buffer = buffer;
|
||||||
|
ares.Offset = offset;
|
||||||
|
ares.Count = count;
|
||||||
|
ares.Callback = cback;
|
||||||
|
ares.State = state;
|
||||||
|
ares.SyncRead = nread;
|
||||||
|
ares.Complete ();
|
||||||
|
return ares;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Avoid reading past the end of the request to allow
|
||||||
|
// for HTTP pipelining
|
||||||
|
if (remaining_body >= 0 && count > remaining_body)
|
||||||
|
count = (int) Math.Min (Int32.MaxValue, remaining_body);
|
||||||
|
|
||||||
|
return stream.BeginRead (buffer, offset, count, cback, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IAsyncResult BeginWrite (
|
||||||
|
byte [] buffer, int offset, int count, AsyncCallback cback, object state)
|
||||||
|
{
|
||||||
|
throw new NotSupportedException ();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Close ()
|
||||||
|
{
|
||||||
|
disposed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int EndRead (IAsyncResult ares)
|
||||||
|
{
|
||||||
|
if (disposed)
|
||||||
|
throw new ObjectDisposedException (GetType ().ToString ());
|
||||||
|
|
||||||
|
if (ares == null)
|
||||||
|
throw new ArgumentNullException ("ares");
|
||||||
|
|
||||||
|
if (ares is HttpStreamAsyncResult) {
|
||||||
|
var ares_ = (HttpStreamAsyncResult) ares;
|
||||||
|
if (!ares.IsCompleted)
|
||||||
|
ares.AsyncWaitHandle.WaitOne ();
|
||||||
|
|
||||||
|
return ares_.SyncRead;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close on exception?
|
||||||
|
int nread = stream.EndRead (ares);
|
||||||
|
if (remaining_body > 0 && nread > 0)
|
||||||
|
remaining_body -= nread;
|
||||||
|
|
||||||
|
return nread;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void EndWrite (IAsyncResult async_result)
|
||||||
|
{
|
||||||
|
throw new NotSupportedException ();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Flush ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public override int Read ([In,Out] byte[] buffer, int offset, int count)
|
public override int Read ([In,Out] byte[] buffer, int offset, int count)
|
||||||
{
|
{
|
||||||
if (disposed)
|
if (disposed)
|
||||||
throw new ObjectDisposedException (typeof (RequestStream).ToString ());
|
throw new ObjectDisposedException (GetType () .ToString ());
|
||||||
|
|
||||||
// Call FillFromBuffer to check for buffer boundaries even when remaining_body is 0
|
// Call FillFromBuffer to check for buffer boundaries even when remaining_body is 0
|
||||||
int nread = FillFromBuffer (buffer, offset, count);
|
int nread = FillFromBuffer (buffer, offset, count);
|
||||||
@ -147,54 +229,7 @@ namespace WebSocketSharp.Net {
|
|||||||
nread = stream.Read (buffer, offset, count);
|
nread = stream.Read (buffer, offset, count);
|
||||||
if (nread > 0 && remaining_body > 0)
|
if (nread > 0 && remaining_body > 0)
|
||||||
remaining_body -= nread;
|
remaining_body -= nread;
|
||||||
return nread;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IAsyncResult BeginRead (byte [] buffer, int offset, int count,
|
|
||||||
AsyncCallback cback, object state)
|
|
||||||
{
|
|
||||||
if (disposed)
|
|
||||||
throw new ObjectDisposedException (typeof (RequestStream).ToString ());
|
|
||||||
|
|
||||||
int nread = FillFromBuffer (buffer, offset, count);
|
|
||||||
if (nread > 0 || nread == -1) {
|
|
||||||
HttpStreamAsyncResult ares = new HttpStreamAsyncResult ();
|
|
||||||
ares.Buffer = buffer;
|
|
||||||
ares.Offset = offset;
|
|
||||||
ares.Count = count;
|
|
||||||
ares.Callback = cback;
|
|
||||||
ares.State = state;
|
|
||||||
ares.SynchRead = nread;
|
|
||||||
ares.Complete ();
|
|
||||||
return ares;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Avoid reading past the end of the request to allow
|
|
||||||
// for HTTP pipelining
|
|
||||||
if (remaining_body >= 0 && count > remaining_body)
|
|
||||||
count = (int) Math.Min (Int32.MaxValue, remaining_body);
|
|
||||||
return stream.BeginRead (buffer, offset, count, cback, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int EndRead (IAsyncResult ares)
|
|
||||||
{
|
|
||||||
if (disposed)
|
|
||||||
throw new ObjectDisposedException (typeof (RequestStream).ToString ());
|
|
||||||
|
|
||||||
if (ares == null)
|
|
||||||
throw new ArgumentNullException ("async_result");
|
|
||||||
|
|
||||||
if (ares is HttpStreamAsyncResult) {
|
|
||||||
HttpStreamAsyncResult r = (HttpStreamAsyncResult) ares;
|
|
||||||
if (!ares.IsCompleted)
|
|
||||||
ares.AsyncWaitHandle.WaitOne ();
|
|
||||||
return r.SynchRead;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close on exception?
|
|
||||||
int nread = stream.EndRead (ares);
|
|
||||||
if (remaining_body > 0 && nread > 0)
|
|
||||||
remaining_body -= nread;
|
|
||||||
return nread;
|
return nread;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,15 +248,6 @@ namespace WebSocketSharp.Net {
|
|||||||
throw new NotSupportedException ();
|
throw new NotSupportedException ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IAsyncResult BeginWrite (byte [] buffer, int offset, int count,
|
#endregion
|
||||||
AsyncCallback cback, object state)
|
|
||||||
{
|
|
||||||
throw new NotSupportedException ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void EndWrite (IAsyncResult async_result)
|
|
||||||
{
|
|
||||||
throw new NotSupportedException ();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1683,6 +1683,140 @@
|
|||||||
An <see cref="T:System.Int32" /> that contains an error code.
|
An <see cref="T:System.Int32" /> that contains an error code.
|
||||||
</value>
|
</value>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:WebSocketSharp.Net.HttpListenerPrefixCollection">
|
||||||
|
<summary>
|
||||||
|
Provides the collection used to store the URI prefixes for the <see cref="T:WebSocketSharp.Net.HttpListener" />.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WebSocketSharp.Net.HttpListenerPrefixCollection.Count">
|
||||||
|
<summary>
|
||||||
|
Gets the number of prefixes contained in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<value>
|
||||||
|
A <see cref="T:System.Int32" /> that contains the number of prefixes.
|
||||||
|
</value>
|
||||||
|
</member>
|
||||||
|
<member name="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsReadOnly">
|
||||||
|
<summary>
|
||||||
|
Gets a value indicating whether access to the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is read-only.
|
||||||
|
</summary>
|
||||||
|
<value>
|
||||||
|
Always returns <c>false</c>.
|
||||||
|
</value>
|
||||||
|
</member>
|
||||||
|
<member name="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsSynchronized">
|
||||||
|
<summary>
|
||||||
|
Gets a value indicating whether access to the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is synchronized.
|
||||||
|
</summary>
|
||||||
|
<value>
|
||||||
|
Always returns <c>false</c>.
|
||||||
|
</value>
|
||||||
|
</member>
|
||||||
|
<member name="M:WebSocketSharp.Net.HttpListenerPrefixCollection.System#Collections#IEnumerable#GetEnumerator">
|
||||||
|
<summary>
|
||||||
|
Gets an object that can be used to iterate through the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<returns>
|
||||||
|
An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to
|
||||||
|
the URI prefix strings in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String)">
|
||||||
|
<summary>
|
||||||
|
Adds the specified <paramref name="uriPrefix" /> to the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<param name="uriPrefix">
|
||||||
|
A <see cref="T:System.String" /> that contains a URI prefix to add.
|
||||||
|
</param>
|
||||||
|
<exception cref="T:System.ArgumentNullException">
|
||||||
|
<paramref name="uriPrefix" /> is <see langword="null" />.
|
||||||
|
</exception>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear">
|
||||||
|
<summary>
|
||||||
|
Removes all URI prefixes from the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String)">
|
||||||
|
<summary>
|
||||||
|
Returns a value indicating whether the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> contains
|
||||||
|
the specified <paramref name="uriPrefix" />.
|
||||||
|
</summary>
|
||||||
|
<returns>
|
||||||
|
<c>true</c> if the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> contains the specified <paramref name="uriPrefix" />;
|
||||||
|
otherwise, <c>false</c>.
|
||||||
|
</returns>
|
||||||
|
<param name="uriPrefix">
|
||||||
|
A <see cref="T:System.String" /> that contains a URI prefix to test.
|
||||||
|
</param>
|
||||||
|
<exception cref="T:System.ArgumentNullException">
|
||||||
|
<paramref name="uriPrefix" /> is <see langword="null" />.
|
||||||
|
</exception>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Copies the contents of the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> to the specified <see cref="T:System.Array" />.
|
||||||
|
</summary>
|
||||||
|
<param name="array">
|
||||||
|
An <see cref="T:System.Array" /> that receives the URI prefix strings in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</param>
|
||||||
|
<param name="offset">
|
||||||
|
An <see cref="T:System.Int32" /> that contains the zero-based index in <paramref name="array" /> at which copying begins.
|
||||||
|
</param>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Copies the contents of the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> to the specified array of <see cref="T:System.String" />.
|
||||||
|
</summary>
|
||||||
|
<param name="array">
|
||||||
|
An array of <see cref="T:System.String" /> that receives the URI prefix strings in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</param>
|
||||||
|
<param name="offset">
|
||||||
|
An <see cref="T:System.Int32" /> that contains the zero-based index in <paramref name="array" /> at which copying begins.
|
||||||
|
</param>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator">
|
||||||
|
<summary>
|
||||||
|
Gets an object that can be used to iterate through the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<returns>
|
||||||
|
An object that implements the IEnumerator<string> interface and provides access to
|
||||||
|
the URI prefix strings in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String)">
|
||||||
|
<summary>
|
||||||
|
Removes the specified <paramref name="uriPrefix" /> from the list of prefixes in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<returns>
|
||||||
|
<c>true</c> if the <paramref name="uriPrefix" /> was found in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />
|
||||||
|
and removed; otherwise, <c>false</c>.
|
||||||
|
</returns>
|
||||||
|
<param name="uriPrefix">
|
||||||
|
A <see cref="T:System.String" /> that contains a URI prefix to remove.
|
||||||
|
</param>
|
||||||
|
<exception cref="T:System.ArgumentNullException">
|
||||||
|
<paramref name="uriPrefix" /> is <see langword="null" />.
|
||||||
|
</exception>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
|
</member>
|
||||||
<member name="M:WebSocketSharp.Net.HttpUtility.HtmlDecode(System.String)">
|
<member name="M:WebSocketSharp.Net.HttpUtility.HtmlDecode(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Decodes an HTML-encoded string and returns the decoded string.
|
Decodes an HTML-encoded string and returns the decoded string.
|
||||||
|
@ -207,7 +207,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<h1 class="PageTitle" id="T:WebSocketSharp.Net.HttpListenerPrefixCollection">HttpListenerPrefixCollection Class</h1>
|
<h1 class="PageTitle" id="T:WebSocketSharp.Net.HttpListenerPrefixCollection">HttpListenerPrefixCollection Class</h1>
|
||||||
<p class="Summary" id="T:WebSocketSharp.Net.HttpListenerPrefixCollection:Summary">
|
<p class="Summary" id="T:WebSocketSharp.Net.HttpListenerPrefixCollection:Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Provides the collection used to store the URI prefixes for the <a href="../WebSocketSharp.Net/HttpListener.html">WebSocketSharp.Net.HttpListener</a>.
|
||||||
</p>
|
</p>
|
||||||
<div id="T:WebSocketSharp.Net.HttpListenerPrefixCollection:Signature">
|
<div id="T:WebSocketSharp.Net.HttpListenerPrefixCollection:Signature">
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
@ -241,7 +241,9 @@
|
|||||||
<td>
|
<td>
|
||||||
<i>
|
<i>
|
||||||
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a>
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a>
|
||||||
</i>. <span class="NotEntered">Documentation for this section has not yet been entered.</span></td>
|
</i>.
|
||||||
|
Gets the number of prefixes contained in the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>[read-only]<div></div></td>
|
<td>[read-only]<div></div></td>
|
||||||
@ -253,7 +255,9 @@
|
|||||||
<td>
|
<td>
|
||||||
<i>
|
<i>
|
||||||
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a>
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a>
|
||||||
</i>. <span class="NotEntered">Documentation for this section has not yet been entered.</span></td>
|
</i>.
|
||||||
|
Gets a value indicating whether access to the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is read-only.
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>[read-only]<div></div></td>
|
<td>[read-only]<div></div></td>
|
||||||
@ -265,7 +269,9 @@
|
|||||||
<td>
|
<td>
|
||||||
<i>
|
<i>
|
||||||
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a>
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a>
|
||||||
</i>. <span class="NotEntered">Documentation for this section has not yet been entered.</span></td>
|
</i>.
|
||||||
|
Gets a value indicating whether access to the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is synchronized.
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -282,7 +288,9 @@
|
|||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<b>
|
<b>
|
||||||
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String)">Add</a>
|
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String)">Add</a>
|
||||||
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>)<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
|
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>)<blockquote>
|
||||||
|
Adds the specified <i>uriPrefix</i> to the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
|
</blockquote></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
@ -292,7 +300,9 @@
|
|||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<b>
|
<b>
|
||||||
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear">Clear</a>
|
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear">Clear</a>
|
||||||
</b>()<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
|
</b>()<blockquote>
|
||||||
|
Removes all URI prefixes from the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
|
</blockquote></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
@ -302,7 +312,10 @@
|
|||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<b>
|
<b>
|
||||||
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String)">Contains</a>
|
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String)">Contains</a>
|
||||||
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
|
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a></nobr><blockquote>
|
||||||
|
Returns a value indicating whether the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> contains
|
||||||
|
the specified <i>uriPrefix</i>.
|
||||||
|
</blockquote></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
@ -312,7 +325,9 @@
|
|||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<b>
|
<b>
|
||||||
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32)">CopyTo</a>
|
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32)">CopyTo</a>
|
||||||
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Array">Array</a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a>)<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
|
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Array">Array</a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a>)<blockquote>
|
||||||
|
Copies the contents of the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> to the specified <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Array">Array</a>.
|
||||||
|
</blockquote></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
@ -322,7 +337,9 @@
|
|||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<b>
|
<b>
|
||||||
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32)">CopyTo</a>
|
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32)">CopyTo</a>
|
||||||
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>[], <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a>)<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
|
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>[], <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a>)<blockquote>
|
||||||
|
Copies the contents of the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> to the specified array of <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>.
|
||||||
|
</blockquote></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
@ -332,7 +349,9 @@
|
|||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<b>
|
<b>
|
||||||
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator">GetEnumerator</a>
|
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator">GetEnumerator</a>
|
||||||
</b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<string></a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
|
</b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<string></a></nobr><blockquote>
|
||||||
|
Gets an object that can be used to iterate through the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
|
</blockquote></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
@ -342,7 +361,9 @@
|
|||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<b>
|
<b>
|
||||||
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String)">Remove</a>
|
<a href="#M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String)">Remove</a>
|
||||||
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
|
</b>(<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a></nobr><blockquote>
|
||||||
|
Removes the specified <i>uriPrefix</i> from the list of prefixes in the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
|
</blockquote></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -362,7 +383,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Gets an object that can be used to iterate through the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -406,7 +427,7 @@
|
|||||||
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String)">Add Method</h3>
|
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String)">Add Method</h3>
|
||||||
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String):member">
|
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String):member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Adds the specified <i>uriPrefix</i> to the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Add</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> uriPrefix)</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Add</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> uriPrefix)</div>
|
||||||
@ -417,10 +438,35 @@
|
|||||||
<i>uriPrefix</i>
|
<i>uriPrefix</i>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> that contains a URI prefix to add.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
<h4 class="Subsection">Exceptions</h4>
|
||||||
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String):Exceptions">
|
||||||
|
<table class="TypeDocumentation">
|
||||||
|
<tr>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Reason</th>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<i>uriPrefix</i> is <tt>null</tt>.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ObjectDisposedException">ObjectDisposedException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
The <a href="../WebSocketSharp.Net/HttpListener.html">WebSocketSharp.Net.HttpListener</a> associated with this <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is closed.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String):Remarks">
|
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Add(System.String):Remarks">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
||||||
@ -433,10 +479,27 @@
|
|||||||
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear">Clear Method</h3>
|
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear">Clear Method</h3>
|
||||||
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear:member">
|
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear:member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Removes all URI prefixes from the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Clear</b> ()</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Clear</b> ()</div>
|
||||||
|
<h4 class="Subsection">Exceptions</h4>
|
||||||
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear:Exceptions">
|
||||||
|
<table class="TypeDocumentation">
|
||||||
|
<tr>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Reason</th>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ObjectDisposedException">ObjectDisposedException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
The <a href="../WebSocketSharp.Net/HttpListener.html">WebSocketSharp.Net.HttpListener</a> associated with this <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is closed.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear:Remarks">
|
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Clear:Remarks">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
||||||
@ -449,7 +512,8 @@
|
|||||||
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String)">Contains Method</h3>
|
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String)">Contains Method</h3>
|
||||||
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String):member">
|
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String):member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Returns a value indicating whether the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> contains
|
||||||
|
the specified <i>uriPrefix</i>.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>Contains</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> uriPrefix)</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>Contains</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> uriPrefix)</div>
|
||||||
@ -460,13 +524,39 @@
|
|||||||
<i>uriPrefix</i>
|
<i>uriPrefix</i>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> that contains a URI prefix to test.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h4 class="Subsection">Returns</h4>
|
<h4 class="Subsection">Returns</h4>
|
||||||
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String):Returns">
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String):Returns">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
<tt>true</tt> if the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> contains the specified <i>uriPrefix</i>;
|
||||||
|
otherwise, <tt>false</tt>.
|
||||||
|
</blockquote>
|
||||||
|
<h4 class="Subsection">Exceptions</h4>
|
||||||
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String):Exceptions">
|
||||||
|
<table class="TypeDocumentation">
|
||||||
|
<tr>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Reason</th>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<i>uriPrefix</i> is <tt>null</tt>.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ObjectDisposedException">ObjectDisposedException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
The <a href="../WebSocketSharp.Net/HttpListener.html">WebSocketSharp.Net.HttpListener</a> associated with this <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is closed.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String):Remarks">
|
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Contains(System.String):Remarks">
|
||||||
@ -480,7 +570,7 @@
|
|||||||
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32)">CopyTo Method</h3>
|
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32)">CopyTo Method</h3>
|
||||||
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32):member">
|
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32):member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Copies the contents of the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> to the specified <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Array">Array</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>CopyTo</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Array">Array</a> array, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> offset)</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>CopyTo</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Array">Array</a> array, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> offset)</div>
|
||||||
@ -491,16 +581,33 @@
|
|||||||
<i>array</i>
|
<i>array</i>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
An <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Array">Array</a> that receives the URI prefix strings in the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<i>offset</i>
|
<i>offset</i>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
An <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> that contains the zero-based index in <i>array</i> at which copying begins.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
<h4 class="Subsection">Exceptions</h4>
|
||||||
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32):Exceptions">
|
||||||
|
<table class="TypeDocumentation">
|
||||||
|
<tr>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Reason</th>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ObjectDisposedException">ObjectDisposedException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
The <a href="../WebSocketSharp.Net/HttpListener.html">WebSocketSharp.Net.HttpListener</a> associated with this <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is closed.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32):Remarks">
|
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.Array,System.Int32):Remarks">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
||||||
@ -513,7 +620,7 @@
|
|||||||
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32)">CopyTo Method</h3>
|
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32)">CopyTo Method</h3>
|
||||||
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32):member">
|
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32):member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Copies the contents of the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> to the specified array of <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>CopyTo</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>[] array, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> offset)</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>CopyTo</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a>[] array, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> offset)</div>
|
||||||
@ -524,16 +631,33 @@
|
|||||||
<i>array</i>
|
<i>array</i>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
An array of <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> that receives the URI prefix strings in the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<i>offset</i>
|
<i>offset</i>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
An <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> that contains the zero-based index in <i>array</i> at which copying begins.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
<h4 class="Subsection">Exceptions</h4>
|
||||||
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32):Exceptions">
|
||||||
|
<table class="TypeDocumentation">
|
||||||
|
<tr>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Reason</th>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ObjectDisposedException">ObjectDisposedException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
The <a href="../WebSocketSharp.Net/HttpListener.html">WebSocketSharp.Net.HttpListener</a> associated with this <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is closed.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32):Remarks">
|
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.CopyTo(System.String[],System.Int32):Remarks">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
||||||
@ -546,13 +670,13 @@
|
|||||||
<h3 id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.Count">Count Property</h3>
|
<h3 id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.Count">Count Property</h3>
|
||||||
<blockquote id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.Count:member">
|
<blockquote id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.Count:member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Gets the number of prefixes contained in the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> <b>Count</b> { get; }</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> <b>Count</b> { get; }</div>
|
||||||
<h4 class="Subsection">Value</h4>
|
<h4 class="Subsection">Value</h4>
|
||||||
<blockquote class="SubsectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.Count:Value">
|
<blockquote class="SubsectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.Count:Value">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> that contains the number of prefixes.
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.Count:Remarks">
|
<div class="SectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.Count:Remarks">
|
||||||
@ -566,13 +690,14 @@
|
|||||||
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator">GetEnumerator Method</h3>
|
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator">GetEnumerator Method</h3>
|
||||||
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator:member">
|
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator:member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Gets an object that can be used to iterate through the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<string></a> <b>GetEnumerator</b> ()</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<string></a> <b>GetEnumerator</b> ()</div>
|
||||||
<h4 class="Subsection">Returns</h4>
|
<h4 class="Subsection">Returns</h4>
|
||||||
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator:Returns">
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator:Returns">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
An object that implements the IEnumerator<string> interface and provides access to
|
||||||
|
the URI prefix strings in the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator:Remarks">
|
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.GetEnumerator:Remarks">
|
||||||
@ -586,13 +711,13 @@
|
|||||||
<h3 id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsReadOnly">IsReadOnly Property</h3>
|
<h3 id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsReadOnly">IsReadOnly Property</h3>
|
||||||
<blockquote id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsReadOnly:member">
|
<blockquote id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsReadOnly:member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Gets a value indicating whether access to the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is read-only.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>IsReadOnly</b> { get; }</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>IsReadOnly</b> { get; }</div>
|
||||||
<h4 class="Subsection">Value</h4>
|
<h4 class="Subsection">Value</h4>
|
||||||
<blockquote class="SubsectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsReadOnly:Value">
|
<blockquote class="SubsectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsReadOnly:Value">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Always returns <tt>false</tt>.
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsReadOnly:Remarks">
|
<div class="SectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsReadOnly:Remarks">
|
||||||
@ -606,13 +731,13 @@
|
|||||||
<h3 id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsSynchronized">IsSynchronized Property</h3>
|
<h3 id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsSynchronized">IsSynchronized Property</h3>
|
||||||
<blockquote id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsSynchronized:member">
|
<blockquote id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsSynchronized:member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Gets a value indicating whether access to the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is synchronized.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>IsSynchronized</b> { get; }</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>IsSynchronized</b> { get; }</div>
|
||||||
<h4 class="Subsection">Value</h4>
|
<h4 class="Subsection">Value</h4>
|
||||||
<blockquote class="SubsectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsSynchronized:Value">
|
<blockquote class="SubsectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsSynchronized:Value">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Always returns <tt>false</tt>.
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsSynchronized:Remarks">
|
<div class="SectionBox" id="P:WebSocketSharp.Net.HttpListenerPrefixCollection.IsSynchronized:Remarks">
|
||||||
@ -626,7 +751,7 @@
|
|||||||
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String)">Remove Method</h3>
|
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String)">Remove Method</h3>
|
||||||
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String):member">
|
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String):member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Removes the specified <i>uriPrefix</i> from the list of prefixes in the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>Remove</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> uriPrefix)</div>
|
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>Remove</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> uriPrefix)</div>
|
||||||
@ -637,13 +762,39 @@
|
|||||||
<i>uriPrefix</i>
|
<i>uriPrefix</i>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String">string</a> that contains a URI prefix to remove.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h4 class="Subsection">Returns</h4>
|
<h4 class="Subsection">Returns</h4>
|
||||||
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String):Returns">
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String):Returns">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
<tt>true</tt> if the <i>uriPrefix</i> was found in the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>
|
||||||
|
and removed; otherwise, <tt>false</tt>.
|
||||||
|
</blockquote>
|
||||||
|
<h4 class="Subsection">Exceptions</h4>
|
||||||
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String):Exceptions">
|
||||||
|
<table class="TypeDocumentation">
|
||||||
|
<tr>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Reason</th>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<i>uriPrefix</i> is <tt>null</tt>.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ObjectDisposedException">ObjectDisposedException</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
The <a href="../WebSocketSharp.Net/HttpListener.html">WebSocketSharp.Net.HttpListener</a> associated with this <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a> is closed.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String):Remarks">
|
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.Remove(System.String):Remarks">
|
||||||
@ -657,14 +808,15 @@
|
|||||||
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.System#Collections#IEnumerable#GetEnumerator">System.Collections.IEnumerable.GetEnumerator Method</h3>
|
<h3 id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.System#Collections#IEnumerable#GetEnumerator">System.Collections.IEnumerable.GetEnumerator Method</h3>
|
||||||
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.System#Collections#IEnumerable#GetEnumerator:member">
|
<blockquote id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.System#Collections#IEnumerable#GetEnumerator:member">
|
||||||
<p class="Summary">
|
<p class="Summary">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Gets an object that can be used to iterate through the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2>Syntax</h2>
|
<h2>Syntax</h2>
|
||||||
<div class="Signature">
|
<div class="Signature">
|
||||||
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.IEnumerator">IEnumerator</a> <b>System.Collections.IEnumerable.GetEnumerator</b> ()</div>
|
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.IEnumerator">IEnumerator</a> <b>System.Collections.IEnumerable.GetEnumerator</b> ()</div>
|
||||||
<h4 class="Subsection">Returns</h4>
|
<h4 class="Subsection">Returns</h4>
|
||||||
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.System#Collections#IEnumerable#GetEnumerator:Returns">
|
<blockquote class="SubsectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.System#Collections#IEnumerable#GetEnumerator:Returns">
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
An object that implements the <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.IEnumerator">IEnumerator</a> interface and provides access to
|
||||||
|
the URI prefix strings in the <a href="../WebSocketSharp.Net/HttpListenerPrefixCollection.html">WebSocketSharp.Net.HttpListenerPrefixCollection</a>.
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h2 class="Section">Remarks</h2>
|
<h2 class="Section">Remarks</h2>
|
||||||
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.System#Collections#IEnumerable#GetEnumerator:Remarks">
|
<div class="SectionBox" id="M:WebSocketSharp.Net.HttpListenerPrefixCollection.System#Collections#IEnumerable#GetEnumerator:Remarks">
|
||||||
|
@ -271,7 +271,7 @@
|
|||||||
<a href="./HttpListenerPrefixCollection.html">HttpListenerPrefixCollection</a>
|
<a href="./HttpListenerPrefixCollection.html">HttpListenerPrefixCollection</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Provides the collection used to store the URI prefixes for the <a href="../WebSocketSharp.Net/HttpListener.html">WebSocketSharp.Net.HttpListener</a>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
|
@ -363,7 +363,7 @@
|
|||||||
<a href="WebSocketSharp.Net/HttpListenerPrefixCollection.html">HttpListenerPrefixCollection</a>
|
<a href="WebSocketSharp.Net/HttpListenerPrefixCollection.html">HttpListenerPrefixCollection</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
|
Provides the collection used to store the URI prefixes for the <a href="./WebSocketSharp.Net/HttpListener.html">WebSocketSharp.Net.HttpListener</a>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
</Interface>
|
</Interface>
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added.</summary>
|
<summary>
|
||||||
|
Provides the collection used to store the URI prefixes for the <see cref="T:WebSocketSharp.Net.HttpListener" />.
|
||||||
|
</summary>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
<Members>
|
<Members>
|
||||||
@ -31,9 +33,19 @@
|
|||||||
<Parameter Name="uriPrefix" Type="System.String" />
|
<Parameter Name="uriPrefix" Type="System.String" />
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Docs>
|
<Docs>
|
||||||
<param name="uriPrefix">To be added.</param>
|
<param name="uriPrefix">
|
||||||
<summary>To be added.</summary>
|
A <see cref="T:System.String" /> that contains a URI prefix to add.
|
||||||
|
</param>
|
||||||
|
<summary>
|
||||||
|
Adds the specified <paramref name="uriPrefix" /> to the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
|
<exception cref="T:System.ArgumentNullException">
|
||||||
|
<paramref name="uriPrefix" /> is <see langword="null" />.
|
||||||
|
</exception>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="Clear">
|
<Member MemberName="Clear">
|
||||||
@ -45,8 +57,13 @@
|
|||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters />
|
<Parameters />
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added.</summary>
|
<summary>
|
||||||
|
Removes all URI prefixes from the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="Contains">
|
<Member MemberName="Contains">
|
||||||
@ -60,10 +77,24 @@
|
|||||||
<Parameter Name="uriPrefix" Type="System.String" />
|
<Parameter Name="uriPrefix" Type="System.String" />
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Docs>
|
<Docs>
|
||||||
<param name="uriPrefix">To be added.</param>
|
<param name="uriPrefix">
|
||||||
<summary>To be added.</summary>
|
A <see cref="T:System.String" /> that contains a URI prefix to test.
|
||||||
<returns>To be added.</returns>
|
</param>
|
||||||
|
<summary>
|
||||||
|
Returns a value indicating whether the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> contains
|
||||||
|
the specified <paramref name="uriPrefix" />.
|
||||||
|
</summary>
|
||||||
|
<returns>
|
||||||
|
<c>true</c> if the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> contains the specified <paramref name="uriPrefix" />;
|
||||||
|
otherwise, <c>false</c>.
|
||||||
|
</returns>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
|
<exception cref="T:System.ArgumentNullException">
|
||||||
|
<paramref name="uriPrefix" /> is <see langword="null" />.
|
||||||
|
</exception>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="CopyTo">
|
<Member MemberName="CopyTo">
|
||||||
@ -78,10 +109,19 @@
|
|||||||
<Parameter Name="offset" Type="System.Int32" />
|
<Parameter Name="offset" Type="System.Int32" />
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Docs>
|
<Docs>
|
||||||
<param name="array">To be added.</param>
|
<param name="array">
|
||||||
<param name="offset">To be added.</param>
|
An <see cref="T:System.Array" /> that receives the URI prefix strings in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
<summary>To be added.</summary>
|
</param>
|
||||||
|
<param name="offset">
|
||||||
|
An <see cref="T:System.Int32" /> that contains the zero-based index in <paramref name="array" /> at which copying begins.
|
||||||
|
</param>
|
||||||
|
<summary>
|
||||||
|
Copies the contents of the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> to the specified <see cref="T:System.Array" />.
|
||||||
|
</summary>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="CopyTo">
|
<Member MemberName="CopyTo">
|
||||||
@ -96,10 +136,19 @@
|
|||||||
<Parameter Name="offset" Type="System.Int32" />
|
<Parameter Name="offset" Type="System.Int32" />
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Docs>
|
<Docs>
|
||||||
<param name="array">To be added.</param>
|
<param name="array">
|
||||||
<param name="offset">To be added.</param>
|
An array of <see cref="T:System.String" /> that receives the URI prefix strings in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
<summary>To be added.</summary>
|
</param>
|
||||||
|
<param name="offset">
|
||||||
|
An <see cref="T:System.Int32" /> that contains the zero-based index in <paramref name="array" /> at which copying begins.
|
||||||
|
</param>
|
||||||
|
<summary>
|
||||||
|
Copies the contents of the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> to the specified array of <see cref="T:System.String" />.
|
||||||
|
</summary>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="Count">
|
<Member MemberName="Count">
|
||||||
@ -110,8 +159,12 @@
|
|||||||
<ReturnType>System.Int32</ReturnType>
|
<ReturnType>System.Int32</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added.</summary>
|
<summary>
|
||||||
<value>To be added.</value>
|
Gets the number of prefixes contained in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<value>
|
||||||
|
A <see cref="T:System.Int32" /> that contains the number of prefixes.
|
||||||
|
</value>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
@ -124,8 +177,13 @@
|
|||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters />
|
<Parameters />
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added.</summary>
|
<summary>
|
||||||
<returns>To be added.</returns>
|
Gets an object that can be used to iterate through the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<returns>
|
||||||
|
An object that implements the IEnumerator<string> interface and provides access to
|
||||||
|
the URI prefix strings in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</returns>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
@ -137,8 +195,12 @@
|
|||||||
<ReturnType>System.Boolean</ReturnType>
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added.</summary>
|
<summary>
|
||||||
<value>To be added.</value>
|
Gets a value indicating whether access to the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is read-only.
|
||||||
|
</summary>
|
||||||
|
<value>
|
||||||
|
Always returns <c>false</c>.
|
||||||
|
</value>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
@ -150,8 +212,12 @@
|
|||||||
<ReturnType>System.Boolean</ReturnType>
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added.</summary>
|
<summary>
|
||||||
<value>To be added.</value>
|
Gets a value indicating whether access to the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is synchronized.
|
||||||
|
</summary>
|
||||||
|
<value>
|
||||||
|
Always returns <c>false</c>.
|
||||||
|
</value>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
@ -166,10 +232,23 @@
|
|||||||
<Parameter Name="uriPrefix" Type="System.String" />
|
<Parameter Name="uriPrefix" Type="System.String" />
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Docs>
|
<Docs>
|
||||||
<param name="uriPrefix">To be added.</param>
|
<param name="uriPrefix">
|
||||||
<summary>To be added.</summary>
|
A <see cref="T:System.String" /> that contains a URI prefix to remove.
|
||||||
<returns>To be added.</returns>
|
</param>
|
||||||
|
<summary>
|
||||||
|
Removes the specified <paramref name="uriPrefix" /> from the list of prefixes in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<returns>
|
||||||
|
<c>true</c> if the <paramref name="uriPrefix" /> was found in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />
|
||||||
|
and removed; otherwise, <c>false</c>.
|
||||||
|
</returns>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
|
<exception cref="T:System.ArgumentNullException">
|
||||||
|
<paramref name="uriPrefix" /> is <see langword="null" />.
|
||||||
|
</exception>
|
||||||
|
<exception cref="T:System.ObjectDisposedException">
|
||||||
|
The <see cref="T:WebSocketSharp.Net.HttpListener" /> associated with this <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" /> is closed.
|
||||||
|
</exception>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="System.Collections.IEnumerable.GetEnumerator">
|
<Member MemberName="System.Collections.IEnumerable.GetEnumerator">
|
||||||
@ -181,8 +260,13 @@
|
|||||||
</ReturnValue>
|
</ReturnValue>
|
||||||
<Parameters />
|
<Parameters />
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>To be added.</summary>
|
<summary>
|
||||||
<returns>To be added.</returns>
|
Gets an object that can be used to iterate through the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</summary>
|
||||||
|
<returns>
|
||||||
|
An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to
|
||||||
|
the URI prefix strings in the <see cref="T:WebSocketSharp.Net.HttpListenerPrefixCollection" />.
|
||||||
|
</returns>
|
||||||
<remarks>To be added.</remarks>
|
<remarks>To be added.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<Overview>
|
<Overview>
|
||||||
<Assemblies>
|
<Assemblies>
|
||||||
<Assembly Name="websocket-sharp" Version="1.0.2.39586">
|
<Assembly Name="websocket-sharp" Version="1.0.2.29254">
|
||||||
<AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 11 00 00 00 29 17 fb 89 fe c3 91 f7 2b cb 8b e2 61 d2 3f 05 93 6d 65 a8 9e 63 72 a6 f5 d5 2c f2 9d 20 fa 0b c0 70 6a f6 88 7e 8b 90 3f 39 f5 76 c8 48 e0 bb 7b b2 7b ed d3 10 a7 1a 0f 70 98 0f 7f f4 4b 53 09 d2 a5 ef 36 c3 56 b4 aa f0 91 72 63 25 07 89 e0 93 3e 3f 2e f2 b9 73 0e 12 15 5d 43 56 c3 f4 70 a5 89 fe f7 f6 ac 3e 77 c2 d8 d0 84 91 f4 0c d1 f3 8e dc c3 c3 b8 38 3d 0c bf 17 de 20 78 c1 ]</AssemblyPublicKey>
|
<AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 11 00 00 00 29 17 fb 89 fe c3 91 f7 2b cb 8b e2 61 d2 3f 05 93 6d 65 a8 9e 63 72 a6 f5 d5 2c f2 9d 20 fa 0b c0 70 6a f6 88 7e 8b 90 3f 39 f5 76 c8 48 e0 bb 7b b2 7b ed d3 10 a7 1a 0f 70 98 0f 7f f4 4b 53 09 d2 a5 ef 36 c3 56 b4 aa f0 91 72 63 25 07 89 e0 93 3e 3f 2e f2 b9 73 0e 12 15 5d 43 56 c3 f4 70 a5 89 fe f7 f6 ac 3e 77 c2 d8 d0 84 91 f4 0c d1 f3 8e dc c3 c3 b8 38 3d 0c bf 17 de 20 78 c1 ]</AssemblyPublicKey>
|
||||||
<Attributes>
|
<Attributes>
|
||||||
<Attribute>
|
<Attribute>
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user