/// Request notification of a new call.
Request notification of a new call.
Request notification of a new call .
pub fn request_call(ctx: RequestCallContext, cq: &CompletionQueue) {
    if ctx.server.shutdown.load(Ordering::Relaxed) {
        return;
    }
    let cq_ref = match cq.borrow() {
        // Shutting down, skip.
        Err(_) => return,
        Ok(c) => c,
    };
    let server_ptr = ctx.server.server;
    let prom = CallTag::request(ctx);
    let request_ptr = prom.request_ctx().unwrap().as_ptr();
    let prom_box = Box::new(prom);
    let tag = Box::into_raw(prom_box);
    let code = unsafe {
        grpc_sys::grpcwrap_server_request_call(
            server_ptr,
            cq_ref.as_ptr(),
            request_ptr,
            tag as *mut _,
        )
    };
    if code != GrpcCallStatus::Ok {
        Box::from(tag);
        panic!("failed to request call: {:?}", code);
    }
}
pub fn request_call ( ctx : RequestCallContext , cq : & CompletionQueue ) { if ctx . server . shutdown . load ( Ordering :: Relaxed ) { return ; } let cq_ref = match cq . borrow ( ) { // Shutting down, skip. Err ( _ ) => return , Ok ( c ) => c , } ; let server_ptr = ctx . server . server ; let prom = CallTag :: request ( ctx ) ; let request_ptr = prom . request_ctx ( ) . unwrap ( ) . as_ptr ( ) ; let prom_box = Box :: new ( prom ) ; let tag = Box :: into_raw ( prom_box ) ; let code = unsafe { grpc_sys :: grpcwrap_server_request_call ( server_ptr , cq_ref . as_ptr ( ) , request_ptr , tag as * mut _ , ) } ; if code != GrpcCallStatus :: Ok { Box :: from ( tag ) ; panic ! ( " " code ) ; } }
Request notification of a new call.
Request notification of a new call .
ctx
RequestCallContext
cq
&CompletionQueue