pub struct QuicChannel {
pub local_addr: SocketAddr,
/* private fields */
}Expand description
QUIC 통신을 담당하는 채널 인스턴스
Fields§
§local_addr: SocketAddrImplementations§
Source§impl QuicChannel
impl QuicChannel
Sourcepub async fn new(
local_addr: SocketAddr,
cert_pem: &str,
key_pem: &str,
tx: Sender<GridMessageWrapper>,
) -> DbxResult<Self>
pub async fn new( local_addr: SocketAddr, cert_pem: &str, key_pem: &str, tx: Sender<GridMessageWrapper>, ) -> DbxResult<Self>
새로운 QUIC 채널 개설 TODO: 상용화 단계에서는 cert_pem과 key_pem 경로를 Config에서 주입받아야 합니다.
Sourcepub async fn send_message(
&self,
peer_addr: SocketAddr,
msg: GridMessage,
) -> DbxResult<()>
pub async fn send_message( &self, peer_addr: SocketAddr, msg: GridMessage, ) -> DbxResult<()>
다른 Grid 노드에 데이터 단방향 전송 (방치)
Sourcepub async fn send_request_and_wait(
&self,
peer_addr: SocketAddr,
msg: GridMessage,
) -> DbxResult<GridMessage>
pub async fn send_request_and_wait( &self, peer_addr: SocketAddr, msg: GridMessage, ) -> DbxResult<GridMessage>
Request-Response 방식 비동기 통신 (FetchShard 등)
Sourcepub async fn send_response(
stream: &mut BidirectionalStream,
msg: GridMessage,
) -> DbxResult<()>
pub async fn send_response( stream: &mut BidirectionalStream, msg: GridMessage, ) -> DbxResult<()>
정적 메서드로 스트림에 메시지 응답 전송
Auto Trait Implementations§
impl Freeze for QuicChannel
impl !RefUnwindSafe for QuicChannel
impl Send for QuicChannel
impl Sync for QuicChannel
impl Unpin for QuicChannel
impl UnsafeUnpin for QuicChannel
impl !UnwindSafe for QuicChannel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more