C# Class VmcController.AddIn.HttpSocketServer

ファイルを表示 Open project: gjniewenhuijse/MceController Class Usage Examples

Public Methods

Method Description
SendHeader ( string sHttpVer, string sMimeType, int iBytesCount, string sStatusCode, Socket &httpSocket ) : void

This function sends the basic header Information to the client browser

SendImage ( string text, string mime_ext, Socket httpSocket ) : void

Sends the served image

SendPage ( string text, Socket httpSocket ) : void

Sends the generated page

SendToBrowser ( Byte bSendData, Socket &mySocket ) : void

Sends data to the browser (client)

SendToBrowser ( String sData, Socket &httpSocket ) : void

Overloaded Function, takes string, convert to bytes and calls overloaded sendToBrowserFunction.

StartListening ( int portNum ) : void

Private Methods

Method Description
OnClientConnection ( IAsyncResult asyn ) : void

This is the call back function, which will be invoked when a client is connected

Method Details

SendHeader() public method

This function sends the basic header Information to the client browser
public SendHeader ( string sHttpVer, string sMimeType, int iBytesCount, string sStatusCode, Socket &httpSocket ) : void
sHttpVer string
sMimeType string
iBytesCount int
sStatusCode string
httpSocket Socket
return void

SendImage() public method

Sends the served image
public SendImage ( string text, string mime_ext, Socket httpSocket ) : void
text string The text.
mime_ext string The mime extention.
httpSocket Socket Socket reference
return void

SendPage() public method

Sends the generated page
public SendPage ( string text, Socket httpSocket ) : void
text string The text.
httpSocket Socket Socket reference
return void

SendToBrowser() public method

Sends data to the browser (client)
public SendToBrowser ( Byte bSendData, Socket &mySocket ) : void
bSendData Byte Byte Array
mySocket Socket Socket reference
return void

SendToBrowser() public method

Overloaded Function, takes string, convert to bytes and calls overloaded sendToBrowserFunction.
public SendToBrowser ( String sData, Socket &httpSocket ) : void
sData String The data to be sent to the browser(client)
httpSocket Socket
return void

StartListening() public method

public StartListening ( int portNum ) : void
portNum int
return void