LumiSoft Mail Server User API
BeginReadHeader Method (storeStream, maxSize, exceededAction, callback, tag)
Namespaces > LumiSoft.Net.IO > StreamHelper > BeginReadHeader(Stream, Int32, SizeExceededAction, ReadToStreamCallback, Object)
Starts reading header from source stream. Reads header data while gets blank line, what is header terminator. For example this method can be used for reading mail,http,sip, ... headers.
Syntax

C# | Visual Basic | Managed C++

    public void BeginReadHeader (
    	Stream storeStream,
    	int maxSize,
    	SizeExceededAction exceededAction,
    	ReadToStreamCallback callback,
    	Object tag
    )

    Public Sub BeginReadHeader ( _
    	storeStream As Stream, _
    	maxSize As Integer, _
    	exceededAction As SizeExceededAction, _
    	callback As ReadToStreamCallback, _
    	tag As Object _
    )

    public:
    void BeginReadHeader (
    	Stream^ storeStream,
    	int maxSize,
    	SizeExceededAction exceededAction,
    	ReadToStreamCallback^ callback,
    	Object^ tag
    )

Parameters

storeStream (Stream)
  Stream where to store data.
maxSize (Int32)
  Maximum muber of bytes to read.
exceededAction (SizeExceededAction)
  Specifies how this method behaves when maximum size exceeded.
callback (ReadToStreamCallback)
  Callback to be called if asynchronous reading completes.
tag (Object)
  User data.

Exceptions

Exception | Condition
--- | ---
ArgumentNullException | Raised when storeStream is null.
InvalidOperationException | Raised when there already is pending read operation.

Assembly: LumiSoft.Net Version: 2.0.2636.18419 (Module: LumiSoft.Net)