C# 클래스 XenAPI.HTTP

파일 보기 프로젝트 열기: xapi-project/xen-api-sdk 1 사용 예제들

공개 메소드들

메소드 설명
BuildUri ( string hostname, string path ) : Uri

Build a URI from a hostname, a path, and some query arguments

CONNECT ( Uri uri, IWebProxy proxy, String session, int timeout_ms ) : Stream
ConnectStream ( Uri uri, IWebProxy proxy, bool nodelay, int timeout_ms ) : Stream

This function will connect a stream to a uri (host and port), negotiating proxies and SSL

CopyStream ( Stream inStream, Stream outStream, DataCopiedDelegate progressDelegate, FuncBool cancellingDelegate ) : long
GET ( Uri uri, IWebProxy proxy, int timeout_ms ) : Stream
Get ( DataCopiedDelegate dataCopiedDelegate, FuncBool cancellingDelegate, Uri uri, IWebProxy proxy, string path, int timeout_ms ) : void

A general HTTP GET method, with delegates for progress and cancelling. May throw various exceptions.

PUT ( Uri uri, IWebProxy proxy, long ContentLength, int timeout_ms ) : Stream
Put ( UpdateProgressDelegate progressDelegate, FuncBool cancellingDelegate, Uri uri, IWebProxy proxy, string path, int timeout_ms ) : void

A general HTTP PUT method, with delegates for progress and cancelling. May throw various exceptions.

UseSSL ( Uri uri ) : bool
getResultCode ( string line ) : int

비공개 메소드들

메소드 설명
ConnectSocket ( Uri uri, bool nodelay, int timeout_ms ) : NetworkStream
DO_HTTP ( Uri uri, IWebProxy proxy, bool nodelay, int timeout_ms ) : Stream
ReadHttpHeaders ( Stream &stream, IWebProxy proxy, bool nodelay, int timeout_ms ) : bool

Read HTTP headers, doing any redirects as necessary

ReadLine ( Stream stream ) : string
ValidateServerCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool
WriteLine ( Stream stream ) : void
WriteLine ( String txt, Stream stream ) : void

메소드 상세

BuildUri() 공개 정적인 메소드

Build a URI from a hostname, a path, and some query arguments
public static BuildUri ( string hostname, string path ) : Uri
hostname string
path string
리턴 System.Uri

CONNECT() 공개 정적인 메소드

public static CONNECT ( Uri uri, IWebProxy proxy, String session, int timeout_ms ) : Stream
uri System.Uri
proxy IWebProxy
session String
timeout_ms int
리턴 Stream

ConnectStream() 공개 정적인 메소드

This function will connect a stream to a uri (host and port), negotiating proxies and SSL
public static ConnectStream ( Uri uri, IWebProxy proxy, bool nodelay, int timeout_ms ) : Stream
uri System.Uri
proxy IWebProxy
nodelay bool
timeout_ms int Timeout, in ms. 0 for no timeout.
리턴 Stream

CopyStream() 공개 정적인 메소드

public static CopyStream ( Stream inStream, Stream outStream, DataCopiedDelegate progressDelegate, FuncBool cancellingDelegate ) : long
inStream Stream
outStream Stream
progressDelegate DataCopiedDelegate
cancellingDelegate FuncBool
리턴 long

GET() 공개 정적인 메소드

public static GET ( Uri uri, IWebProxy proxy, int timeout_ms ) : Stream
uri System.Uri
proxy IWebProxy
timeout_ms int
리턴 Stream

Get() 공개 정적인 메소드

A general HTTP GET method, with delegates for progress and cancelling. May throw various exceptions.
public static Get ( DataCopiedDelegate dataCopiedDelegate, FuncBool cancellingDelegate, Uri uri, IWebProxy proxy, string path, int timeout_ms ) : void
dataCopiedDelegate DataCopiedDelegate
cancellingDelegate FuncBool Delegate called periodically to see if need to cancel
uri System.Uri URI to GET from
proxy IWebProxy A proxy to handle the HTTP connection
path string Path to file to receive the data
timeout_ms int Timeout for the connection in ms. 0 for no timeout.
리턴 void

PUT() 공개 정적인 메소드

public static PUT ( Uri uri, IWebProxy proxy, long ContentLength, int timeout_ms ) : Stream
uri System.Uri
proxy IWebProxy
ContentLength long
timeout_ms int
리턴 Stream

Put() 공개 정적인 메소드

A general HTTP PUT method, with delegates for progress and cancelling. May throw various exceptions.
public static Put ( UpdateProgressDelegate progressDelegate, FuncBool cancellingDelegate, Uri uri, IWebProxy proxy, string path, int timeout_ms ) : void
progressDelegate UpdateProgressDelegate Delegate called periodically (500ms) with percent complete
cancellingDelegate FuncBool Delegate called periodically to see if need to cancel
uri System.Uri URI to PUT to
proxy IWebProxy A proxy to handle the HTTP connection
path string Path to file to put
timeout_ms int Timeout for the connection in ms. 0 for no timeout.
리턴 void

UseSSL() 공개 정적인 메소드

public static UseSSL ( Uri uri ) : bool
uri System.Uri
리턴 bool

getResultCode() 공개 정적인 메소드

public static getResultCode ( string line ) : int
line string
리턴 int