use epoll implementation from vmm-sys-util
Signed-off-by: defunct <defunct@defunct.io> Signed-off-by: YUAN LYU <lyuyuan92@gmail.com>
This commit is contained in:
@@ -419,7 +419,7 @@ impl HttpServer {
|
||||
/// epoll.ctl(
|
||||
/// epoll::ControlOperation::Add,
|
||||
/// server.epoll().as_raw_fd(),
|
||||
/// &epoll::EpollEvent::new(epoll::EventSet::IN, 1234u64),
|
||||
/// epoll::EpollEvent::new(epoll::EventSet::IN, 1234u64),
|
||||
/// )
|
||||
/// .unwrap();
|
||||
///
|
||||
@@ -523,7 +523,7 @@ impl HttpServer {
|
||||
fn epoll_mod(epoll: &epoll::Epoll, stream_fd: RawFd, evset: epoll::EventSet) -> Result<()> {
|
||||
let event = epoll::EpollEvent::new(evset, stream_fd as u64);
|
||||
epoll
|
||||
.ctl(epoll::ControlOperation::Modify, stream_fd, &event)
|
||||
.ctl(epoll::ControlOperation::Modify, stream_fd, event)
|
||||
.map_err(ServerError::IOError)
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ impl HttpServer {
|
||||
.ctl(
|
||||
epoll::ControlOperation::Add,
|
||||
stream_fd,
|
||||
&epoll::EpollEvent::new(epoll::EventSet::IN, stream_fd as u64),
|
||||
epoll::EpollEvent::new(epoll::EventSet::IN, stream_fd as u64),
|
||||
)
|
||||
.map_err(ServerError::IOError)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user