SkyWay Unity SDK
公式APIリファレンス
読み取り中…
検索中…
一致する文字列を見つけられません
WebSocketSharp.Ext クラス

Provides a set of static methods for websocket-sharp. [詳解]

静的公開メンバ関数

static string GetDescription (this HttpStatusCode code)
 Gets the description of the specified HTTP status code.
 
static string GetStatusDescription (this int code)
 Gets the description of the specified HTTP status code.
 
static bool IsCloseStatusCode (this ushort value)
 Determines whether the specified ushort is in the range of the status code for the WebSocket connection close.
 
static bool IsEnclosedIn (this string value, char c)
 Determines whether the specified string is enclosed in the specified character.
 
static bool IsHostOrder (this ByteOrder order)
 Determines whether the specified byte order is host (this computer architecture) byte order.
 
static bool IsLocal (this System.Net.IPAddress address)
 Determines whether the specified IP address is a local IP address.
 
static bool IsNullOrEmpty (this string value)
 Determines whether the specified string is null or an empty string.
 
static T[] SubArray< T > (this T[] array, int startIndex, int length)
 Retrieves a sub-array from the specified array. A sub-array starts at the specified index in the array.
 
static T[] SubArray< T > (this T[] array, long startIndex, long length)
 Retrieves a sub-array from the specified array. A sub-array starts at the specified index in the array.
 
static void Times (this int n, Action< int > action)
 Executes the specified delegate n times.
 
static void Times (this long n, Action< long > action)
 Executes the specified delegate n times.
 
static byte[] ToHostOrder (this byte[] source, ByteOrder sourceOrder)
 Converts the order of elements in the specified byte array to host (this computer architecture) byte order.
 
static string ToString< T > (this T[] array, string separator)
 Converts the specified array to a string.
 
static Uri ToUri (this string value)
 Converts the specified string to a Uri.
 

詳解

Provides a set of static methods for websocket-sharp.

関数詳解

◆ GetDescription()

static string WebSocketSharp.Ext.GetDescription ( this HttpStatusCode code)
inlinestatic

Gets the description of the specified HTTP status code.

戻り値
A string that represents the description of the HTTP status code.
引数
codeOne of the HttpStatusCode enum values. It specifies the HTTP status code.

◆ GetStatusDescription()

static string WebSocketSharp.Ext.GetStatusDescription ( this int code)
inlinestatic

Gets the description of the specified HTTP status code.

戻り値
A string that represents the description of the HTTP status code.

An empty string if the description is not present.

引数
codeAn int that specifies the HTTP status code.

◆ IsCloseStatusCode()

static bool WebSocketSharp.Ext.IsCloseStatusCode ( this ushort value)
inlinestatic

Determines whether the specified ushort is in the range of the status code for the WebSocket connection close.

The ranges are the following:

  • 1000-2999: These numbers are reserved for definition by the WebSocket protocol.
  • 3000-3999: These numbers are reserved for use by libraries, frameworks, and applications.
  • 4000-4999: These numbers are reserved for private use.
戻り値
true if value is in the range of the status code for the close; otherwise, false.
引数
valueA ushort to test.

◆ IsEnclosedIn()

static bool WebSocketSharp.Ext.IsEnclosedIn ( this string value,
char c )
inlinestatic

Determines whether the specified string is enclosed in the specified character.

戻り値
true if value is enclosed in c ; otherwise, false.
引数
valueA string to test.
cA char to find.

◆ IsHostOrder()

static bool WebSocketSharp.Ext.IsHostOrder ( this ByteOrder order)
inlinestatic

Determines whether the specified byte order is host (this computer architecture) byte order.

戻り値
true if order is host byte order; otherwise, false.
引数
orderOne of the ByteOrder enum values to test.

◆ IsLocal()

static bool WebSocketSharp.Ext.IsLocal ( this System.Net.IPAddress address)
inlinestatic

Determines whether the specified IP address is a local IP address.

This local means NOT REMOTE for the current host.

戻り値
true if address is a local IP address; otherwise, false.
引数
addressA System.Net.IPAddress to test.
例外
ArgumentNullExceptionaddress is null.

◆ IsNullOrEmpty()

static bool WebSocketSharp.Ext.IsNullOrEmpty ( this string value)
inlinestatic

Determines whether the specified string is null or an empty string.

戻り値
true if value is null or an empty string; otherwise, false.
引数
valueA string to test.

◆ SubArray< T >() [1/2]

static T[] WebSocketSharp.Ext.SubArray< T > ( this T[] array,
int startIndex,
int length )
inlinestatic

Retrieves a sub-array from the specified array. A sub-array starts at the specified index in the array.

戻り値
An array of T that receives a sub-array.
引数
arrayAn array of T from which to retrieve a sub-array.
startIndexAn int that specifies the zero-based index in the array at which retrieving starts.
lengthAn int that specifies the number of elements to retrieve.
テンプレート引数
TThe type of elements in the array.
例外
ArgumentNullExceptionarray is null.
ArgumentOutOfRangeExceptionstartIndex is less than zero. -or- startIndex is greater than the end of the array. -or- length is less than zero. -or- length is greater than the number of elements from startIndex to the end of the array.

◆ SubArray< T >() [2/2]

static T[] WebSocketSharp.Ext.SubArray< T > ( this T[] array,
long startIndex,
long length )
inlinestatic

Retrieves a sub-array from the specified array. A sub-array starts at the specified index in the array.

戻り値
An array of T that receives a sub-array.
引数
arrayAn array of T from which to retrieve a sub-array.
startIndexA long that specifies the zero-based index in the array at which retrieving starts.
lengthA long that specifies the number of elements to retrieve.
テンプレート引数
TThe type of elements in the array.
例外
ArgumentNullExceptionarray is null.
ArgumentOutOfRangeExceptionstartIndex is less than zero. -or- startIndex is greater than the end of the array. -or- length is less than zero. -or- length is greater than the number of elements from startIndex to the end of the array.

◆ Times() [1/2]

static void WebSocketSharp.Ext.Times ( this int n,
Action< int > action )
inlinestatic

Executes the specified delegate n times.

引数
nAn int that specifies the number of times to execute.
actionAn Action<int> delegate to execute. The int parameter is the zero-based count of iteration.

◆ Times() [2/2]

static void WebSocketSharp.Ext.Times ( this long n,
Action< long > action )
inlinestatic

Executes the specified delegate n times.

引数
nA long that specifies the number of times to execute.
actionAn Action<long> delegate to execute. The long parameter is the zero-based count of iteration.

◆ ToHostOrder()

static byte[] WebSocketSharp.Ext.ToHostOrder ( this byte[] source,
ByteOrder sourceOrder )
inlinestatic

Converts the order of elements in the specified byte array to host (this computer architecture) byte order.

戻り値
An array of byte converted from source .

source if the number of elements in it is less than 2 or sourceOrder is same as host byte order.

引数
sourceAn array of byte to convert.
sourceOrderOne of the ByteOrder enum values. It specifies the order of elements in source .
例外
ArgumentNullExceptionsource is null.

◆ ToString< T >()

static string WebSocketSharp.Ext.ToString< T > ( this T[] array,
string separator )
inlinestatic

Converts the specified array to a string.

戻り値
A string converted by concatenating each element of array across separator .

An empty string if array is an empty array.

引数
arrayAn array of T to convert.
separatorA string used to separate each element of array .
テンプレート引数
TThe type of elements in array .
例外
ArgumentNullExceptionarray is null.

◆ ToUri()

static Uri WebSocketSharp.Ext.ToUri ( this string value)
inlinestatic

Converts the specified string to a Uri.

戻り値
A Uri converted from value .

null if the conversion has failed.

引数
valueA string to convert.

このクラス詳解は次のファイルから抽出されました: