Dreamine.Communication.Core 1.0.2
Dreamine.Communication.Core 통신 기능과 관련 API를 제공합니다.
로딩중...
검색중...
일치하는것 없음
Dreamine.Communication.Core.Framing.IMessageFrameCodec 인터페이스 참조

더 자세히 ...

Dreamine.Communication.Core.Framing.IMessageFrameCodec에 대한 상속 다이어그램 :

Public 멤버 함수

Task WriteFrameAsync (Stream stream, byte[] payload, CancellationToken cancellationToken=default)
Task< byte[]?> ReadFrameAsync (Stream stream, CancellationToken cancellationToken=default)

상세한 설명

바이트 스트림에서 완전한 메시지 프레임을 읽고 쓰는 계약입니다.

IMessageFrameCodec.cs 파일의 15 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ ReadFrameAsync()

Task< byte[]?> Dreamine.Communication.Core.Framing.IMessageFrameCodec.ReadFrameAsync ( Stream stream,
CancellationToken cancellationToken = default )

스트림에서 하나의 완전한 메시지 프레임을 비동기적으로 읽습니다.

매개변수
stream프레임을 읽을 읽기 가능한 스트림입니다.
cancellationToken비동기 읽기 작업의 취소 요청을 감시하는 토큰입니다.
반환값
프레임에서 추출한 메시지 데이터이며, 데이터 없이 스트림이 끝나면 null입니다.
예외
ArgumentNullExceptionstreamnull인 경우 발생할 수 있습니다.
OperationCanceledException작업 취소가 요청된 경우 발생할 수 있습니다.

Dreamine.Communication.Core.Framing.DelimiterMessageFrameCodec, Dreamine.Communication.Core.Framing.LengthPrefixedMessageFrameCodec, Dreamine.Communication.Core.Framing.RawAvailableMessageFrameCodec에서 구현되었습니다.

◆ WriteFrameAsync()

Task Dreamine.Communication.Core.Framing.IMessageFrameCodec.WriteFrameAsync ( Stream stream,
byte[] payload,
CancellationToken cancellationToken = default )

하나의 메시지 페이로드를 프레임 형식으로 스트림에 비동기 기록합니다.

매개변수
stream프레임을 기록할 쓰기 가능한 스트림입니다.
payload프레임에 포함할 메시지 데이터입니다.
cancellationToken비동기 쓰기 작업의 취소 요청을 감시하는 토큰입니다.
반환값
비동기 프레임 쓰기 작업입니다.
예외
ArgumentNullExceptionstream 또는 payloadnull인 경우 발생할 수 있습니다.
OperationCanceledException작업 취소가 요청된 경우 발생할 수 있습니다.

Dreamine.Communication.Core.Framing.DelimiterMessageFrameCodec, Dreamine.Communication.Core.Framing.LengthPrefixedMessageFrameCodec, Dreamine.Communication.Core.Framing.RawAvailableMessageFrameCodec에서 구현되었습니다.


이 인터페이스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: