C# Class ModServer.HttpConnection

This class is uses Microsoft's implementation of SSL. Most of the code is copied from: http://msdn.microsoft.com/en-us/library/system.net.security.sslstream%28v=vs.110%29.aspx
Exibir arquivo Open project: tyandjel94/RowanParkingPassApp Class Usage Examples

Public Properties

Property Type Description
BUFFER_SIZE int
CHUNKED_TERMINATOR string
DL_CACHE_SIZE long
stream Stream

Public Methods

Method Description
HttpConnection ( string address, int port, string servername, Stream stream ) : System
awaitMessage ( ) : HttpResponse
close ( ) : void
continueDownload ( Stream output, HttpResponse response, Action setup, Action step ) : bool
continueDownload ( Stream output, HttpResponse response, Action setup, Action step, System.Action whenfinished ) : bool
nullAction ( int param1 ) : void
sendRequest ( HttpRequest request ) : HttpResponse
sendRequestAsync ( HttpRequest request, AwaitMessageCallback callBack ) : Thread

MOVED the requesting to a new thread and added the callBack error

takeByte ( byte buffer ) : byte[]

Private Methods

Method Description
processResponse ( HttpResponse response ) : HttpResponse

Method Details

HttpConnection() public method

public HttpConnection ( string address, int port, string servername, Stream stream ) : System
address string
port int
servername string
stream Stream
return System

awaitMessage() public method

public awaitMessage ( ) : HttpResponse
return HttpResponse

close() public method

public close ( ) : void
return void

continueDownload() public method

public continueDownload ( Stream output, HttpResponse response, Action setup, Action step ) : bool
output Stream
response HttpResponse
setup Action
step Action
return bool

continueDownload() public method

public continueDownload ( Stream output, HttpResponse response, Action setup, Action step, System.Action whenfinished ) : bool
output Stream
response HttpResponse
setup Action
step Action
whenfinished System.Action
return bool

nullAction() public static method

public static nullAction ( int param1 ) : void
param1 int
return void

sendRequest() public method

public sendRequest ( HttpRequest request ) : HttpResponse
request HttpRequest
return HttpResponse

sendRequestAsync() public method

MOVED the requesting to a new thread and added the callBack error
public sendRequestAsync ( HttpRequest request, AwaitMessageCallback callBack ) : Thread
request HttpRequest
callBack AwaitMessageCallback response null if exception. exception null otehrwise
return Thread

takeByte() public method

public takeByte ( byte buffer ) : byte[]
buffer byte
return byte[]

Property Details

BUFFER_SIZE public_oe static_oe property

public static int BUFFER_SIZE
return int

CHUNKED_TERMINATOR public_oe static_oe property

public static string CHUNKED_TERMINATOR
return string

DL_CACHE_SIZE public_oe static_oe property

public static long DL_CACHE_SIZE
return long

stream public_oe property

public Stream stream
return Stream