C# 클래스 MailKit.Net.Smtp.SmtpStream

A stream for communicating with an SMTP server.
A stream capable of reading SMTP server responses.
상속: Stream, ICancellableStream
파일 보기 프로젝트 열기: jstedfast/MailKit 1 사용 예제들

공개 메소드들

메소드 설명
Flush ( ) : void

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Flush ( CancellationToken cancellationToken ) : void

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Read ( byte buffer, int offset, int count ) : int

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.

Read ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : int

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.

ReadResponse ( CancellationToken cancellationToken ) : MailKit.Net.Smtp.SmtpResponse

Read an SMTP server response.

Reads a full command response from the SMTP server.

Seek ( long offset, SeekOrigin origin ) : long

Sets the position within the current stream.

SetLength ( long value ) : void

Sets the length of the stream.

SmtpStream ( Stream source, StreamSocket socket, IProtocolLogger protocolLogger ) : System

Initializes a new instance of the MailKit.Net.Smtp.SmtpStream class.

Creates a new SmtpStream.

Write ( byte buffer, int offset, int count ) : void

Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.

Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.

Write ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : void

Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.

Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the SmtpStream and optionally releases the managed resources.

Releases the unmanaged resources used by the SmtpStream and optionally releases the managed resources.

비공개 메소드들

메소드 설명
CheckDisposed ( ) : void
Poll ( SelectMode mode, CancellationToken cancellationToken ) : void
ReadAhead ( CancellationToken cancellationToken ) : int
SmtpStream ( ) : System
TryParseInt32 ( byte text, int &index, int endIndex, int &value ) : bool
ValidateArguments ( byte buffer, int offset, int count ) : void

메소드 상세

Dispose() 보호된 메소드

Releases the unmanaged resources used by the SmtpStream and optionally releases the managed resources.
Releases the unmanaged resources used by the SmtpStream and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; /// false to release only the unmanaged resources.
리턴 void

Flush() 공개 메소드

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
/// The stream has been disposed. /// /// The stream does not support writing. /// /// An I/O error occurred. ///
public Flush ( ) : void
리턴 void

Flush() 공개 메소드

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
/// The stream has been disposed. /// /// The stream does not support writing. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. ///
public Flush ( CancellationToken cancellationToken ) : void
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 void

Read() 공개 메소드

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.
Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.
/// is null. /// /// is less than zero or greater than the length of . /// -or- /// The is not large enough to contain bytes strting /// at the specified . /// /// The stream has been disposed. /// /// An I/O error occurred. ///
public Read ( byte buffer, int offset, int count ) : int
buffer byte The buffer.
offset int The buffer offset.
count int The number of bytes to read.
리턴 int

Read() 공개 메소드

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.
Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.
/// is null. /// /// is less than zero or greater than the length of . /// -or- /// The is not large enough to contain bytes strting /// at the specified . /// /// The stream has been disposed. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. ///
public Read ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : int
buffer byte The buffer.
offset int The buffer offset.
count int The number of bytes to read.
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 int

ReadResponse() 공개 메소드

Read an SMTP server response.
Reads a full command response from the SMTP server.
/// The stream has been disposed. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// An SMTP protocol error occurred. ///
public ReadResponse ( CancellationToken cancellationToken ) : MailKit.Net.Smtp.SmtpResponse
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 MailKit.Net.Smtp.SmtpResponse

Seek() 공개 메소드

Sets the position within the current stream.
/// The stream does not support seeking. ///
public Seek ( long offset, SeekOrigin origin ) : long
offset long The offset into the stream relative to the .
origin SeekOrigin The origin to seek from.
리턴 long

SetLength() 공개 메소드

Sets the length of the stream.
/// The stream does not support setting the length. ///
public SetLength ( long value ) : void
value long The desired length of the stream in bytes.
리턴 void

SmtpStream() 공개 메소드

Initializes a new instance of the MailKit.Net.Smtp.SmtpStream class.
Creates a new SmtpStream.
public SmtpStream ( Stream source, StreamSocket socket, IProtocolLogger protocolLogger ) : System
source Stream The underlying network stream.
socket Windows.Networking.Sockets.StreamSocket The underlying network socket.
protocolLogger IProtocolLogger The protocol logger.
리턴 System

Write() 공개 메소드

Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.
Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.
/// is null. /// /// is less than zero or greater than the length of . /// -or- /// The is not large enough to contain bytes strting /// at the specified . /// /// The stream has been disposed. /// /// The stream does not support writing. /// /// An I/O error occurred. ///
public Write ( byte buffer, int offset, int count ) : void
buffer byte The buffer to write.
offset int The offset of the first byte to write.
count int The number of bytes to write.
리턴 void

Write() 공개 메소드

Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.
Writes a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.
/// is null. /// /// is less than zero or greater than the length of . /// -or- /// The is not large enough to contain bytes strting /// at the specified . /// /// The stream has been disposed. /// /// The stream does not support writing. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. ///
public Write ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : void
buffer byte The buffer to write.
offset int The offset of the first byte to write.
count int The number of bytes to write.
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 void