C# Class Griffin.Net.Protocols.Http.HttpMessageEncoder

Used to encode request/response into a byte stream.
Inheritance: IMessageEncoder
Datei anzeigen Open project: jgauffin/Griffin.Framework Class Usage Examples

Public Methods

Method Description
Clear ( ) : void

Remove everything used for the last message

HttpMessageEncoder ( ) : System

Initializes a new instance of the HttpMessageEncoder class.

OnSendCompleted ( int bytesTransferred ) : bool

The previous IMessageEncoder.Send has just completed.

true if the message have been sent successfully; otherwise false.

Prepare ( object message ) : void

Are about to send a new message

Can be used to prepare the next message. for instance serialize it etc.

Send ( ISocketBuffer buffer ) : void

Buffer structure used for socket send operations.

Method Details

Clear() public method

Remove everything used for the last message
public Clear ( ) : void
return void

HttpMessageEncoder() public method

Initializes a new instance of the HttpMessageEncoder class.
public HttpMessageEncoder ( ) : System
return System

OnSendCompleted() public method

The previous IMessageEncoder.Send has just completed.
true if the message have been sent successfully; otherwise false.
public OnSendCompleted ( int bytesTransferred ) : bool
bytesTransferred int
return bool

Prepare() public method

Are about to send a new message
Can be used to prepare the next message. for instance serialize it etc.
Message is of a type that the encoder cannot handle.
public Prepare ( object message ) : void
message object Message to send
return void

Send() public method

Buffer structure used for socket send operations.
public Send ( ISocketBuffer buffer ) : void
buffer ISocketBuffer /// Do note that there are not buffer attached to the structure, you have to assign one yourself using /// . This choice was made /// to prevent unnecessary copy operations. ///
return void