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

Represents the event data for the HTTP request events of the HttpServer class. [詳解]

公開メンバ関数

byte[] ReadFile (string path)
 Reads the specified file from the document folder of the HttpServer class.
 
bool TryReadFile (string path, out byte[] contents)
 Tries to read the specified file from the document folder of the HttpServer class.
 

プロパティ

HttpListenerRequest Request [get]
 Gets the request data sent from a client.
 
HttpListenerResponse Response [get]
 Gets the response data to return to the client.
 
IPrincipal User [get]
 Gets the information for the client.
 

詳解

Represents the event data for the HTTP request events of the HttpServer class.

An HTTP request event occurs when the HttpServer instance receives an HTTP request.

You should access the Request property if you would like to get the request data sent from a client.

And you should access the Response property if you would like to get the response data to return to the client.

関数詳解

◆ ReadFile()

byte[] WebSocketSharp.Server.HttpRequestEventArgs.ReadFile ( string path)
inline

Reads the specified file from the document folder of the HttpServer class.

戻り値
An array of byte that receives the contents of the file.

null if the read has failed.

引数
pathA string that specifies a virtual path to find the file from the document folder.
例外
ArgumentExceptionpath is an empty string. -or- path contains "..".
ArgumentNullExceptionpath is null.

◆ TryReadFile()

bool WebSocketSharp.Server.HttpRequestEventArgs.TryReadFile ( string path,
out byte[] contents )
inline

Tries to read the specified file from the document folder of the HttpServer class.

戻り値
true if the try has succeeded; otherwise, false.
引数
pathA string that specifies a virtual path to find the file from the document folder.
contentsWhen this method returns, an array of byte that receives the contents of the file. null if the read has failed.
例外
ArgumentExceptionpath is an empty string. -or- path contains "..".
ArgumentNullExceptionpath is null.

プロパティ詳解

◆ Request

HttpListenerRequest WebSocketSharp.Server.HttpRequestEventArgs.Request
get

Gets the request data sent from a client.

A HttpListenerRequest that provides the methods and properties for the request data.

◆ Response

HttpListenerResponse WebSocketSharp.Server.HttpRequestEventArgs.Response
get

Gets the response data to return to the client.

A HttpListenerResponse that provides the methods and properties for the response data.

◆ User

IPrincipal WebSocketSharp.Server.HttpRequestEventArgs.User
get

Gets the information for the client.

A IPrincipal instance that represents identity, authentication scheme, and security roles for the client.

null if the client is not authenticated.


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