Benign cargo Download

mod.rs

Contains an unbounded block loopimports http
SHA-25686f9f00994b7f06ed51244bb5c84809f6838b7df4ddff9c35dd3b0d76cd975d2

Evidence

imports http lines 3–44
3:21… eated to listen on a port, parse HTTP requests, and hand
4//! them off to a `Service`.
5
⋯4 lines
10mod service;
11
12use std::cell::RefCell;
13use std::fmt;
14use std::io;
15use std::marker::PhantomData;
16use std::net::SocketAddr;
17use std::rc::{Rc, Weak};
18use std::time::Duration;
19
20use futures::task::{self, Task};
21use futures::future::{self};
22use futures::{Future, Stream, Poll, Async};
23
24#[cfg(feature = "compat")]
25use http;
26
27use tokio_io::{AsyncRead, AsyncWrite};
28use tokio::reactor::{Core, Handle, Timeout};
29use tokio::net::TcpListener;
30pub use tokio_service::{NewService, Service};
31
32use proto;
33#[cfg(feature = "compat")]
34use proto::Body;
35use self::hyper_service::HyperService;
36
37pub use proto::response::Response;
38pub use proto::request::Request;
39
40feat_server_proto! {
⋯4 lines
Contains an unbounded block loop lines 479–485
479:22… ror;
480
481 fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
482 loop {
483 if let Some(conn) = try_ready!(self.serve.poll()) {
484 let fut = conn
485 .map(|_| ()) …
imports tokio::net::TcpStream lines 583–595
583:4… }
584}
585
586mod addr_stream {
587 use std::io::{self, Read, Write};
588 use bytes::{Buf, BufMut};
589 use futures::Poll;
590 use tokio::net::TcpStream;
591 use tokio_io::{AsyncRead, AsyncWrite};
592
593 pub fn new(tcp: TcpStream) -> AddrStream {
594 AddrStream {
595 in …
Rust reads from a named network stream lines 599–613
599 #[derive(Debug)]
600 pub struct AddrStream {
601 inner: TcpStream,
602 }
603
⋯10 lines
imports super::Request lines 699–707
⋯4 lines
703
704mod hyper_service {
705 use super::{Request, Response, Service, Stream};
706 /// A "trait alias" for any type that implements `Service` with hyper's
707 /// Request, Response, an …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.