#![cfg(target_os = "linux")]
use std::mem::size_of;
use dope_session::pool::Direction;
use dope_session::pool::server::Server;
use dope_session::protocol::server::{HandlerAction, ServerProtocol};
use dope_session::{Plain, WriteBufArr};
use dope_transport::Tcp;
use dope_uring::UringBackend;
struct DummyProto;
impl ServerProtocol for DummyProto {
type Head<'buf> = ();
type ConnState = ();
type CodecLayer = Plain;
fn parse<'buf>(&self, _: &mut (), _: &'buf [u8]) -> Option<((), u32, u32)> {
None
}
fn handle<'buf>(&mut self, _: &'buf [u8], _: (), _: &mut [u8]) -> HandlerAction {
HandlerAction::Send {
written: 0,
close_after: true,
}
}
}
const _: () = {
let sz = size_of::<<Server<DummyProto, Tcp> as Direction<UringBackend>>::WriteBuf>();
assert!(sz == size_of::<WriteBufArr>());
};