C# Class CSMongo.Requests.RequestBase

Base class for making requests to the server
Show file Open project: hugoware/CSMongo Class Usage Examples

Public Methods

Method Description
GetBody ( ) : byte[]

Returns the bytes that should be sent as a header

GetHeader ( ) : byte[]

Returns the bytes to send as a header for this request

OnResponse ( Stream stream ) : ResponseBase
RequestBase ( OpCodeTypes code ) : System

Creates a new request for the specified type

Reset ( ) : void

Resets the bytes for this request

Protected Methods

Method Description
GenerateBody ( DynamicStream stream ) : void

Required function to generate the content for sending

OnBeforeGenerateStream ( ) : void

Optional functionality to perform before generating the stream content

Private Methods

Method Description
_GenerateStream ( ) : void

Method Details

GenerateBody() protected abstract method

Required function to generate the content for sending
protected abstract GenerateBody ( DynamicStream stream ) : void
stream CSMongo.IO.DynamicStream
return void

GetBody() public method

Returns the bytes that should be sent as a header
public GetBody ( ) : byte[]
return byte[]

GetHeader() public method

Returns the bytes to send as a header for this request
public GetHeader ( ) : byte[]
return byte[]

OnBeforeGenerateStream() protected method

Optional functionality to perform before generating the stream content
protected OnBeforeGenerateStream ( ) : void
return void

OnResponse() public method

public OnResponse ( Stream stream ) : ResponseBase
stream Stream
return ResponseBase

RequestBase() public method

Creates a new request for the specified type
public RequestBase ( OpCodeTypes code ) : System
code OpCodeTypes
return System

Reset() public method

Resets the bytes for this request
public Reset ( ) : void
return void