Benign cargo Download

client.rs

imports base64imports http::Error as HttpError
SHA-25606ba695b08bfb1e618c0ba2b99029cdf1cbed6c6f021302d8b05d62509ba4828

Evidence

imports base64 lines 1–37
1//! Http client request
2use std::cell::RefCell;
3use std::rc::Rc;
4use std::time::Duration;
5use std::{fmt, io, str};
6
7use base64;
8use bytes::Bytes;
9use cookie::Cookie;
10use futures::sync::mpsc::{unbounded, UnboundedSender};
11use futures::{Async, Future, Poll, Stream};
12use http::header::{self, HeaderName, HeaderValue};
13use http::{Error as HttpError, HttpTryFrom, StatusCode};
14use rand;
15use sha1::Sha1;
16
17use actix::{Addr, SystemService};
18
19use body::{Binary, Body};
20use error::{Error, UrlParseError};
21use header::IntoHeaderValue;
22use httpmessage::HttpMessage;
23use payload::PayloadBuffer;
24
25use client::{
26 ClientConnector, ClientRequest, ClientRequestBuilder, HttpResponseParserError,
27 Pipeline, SendRequest, SendRequestError,
28};
29
30use super::frame::{Frame, FramedMessage};
31use super::proto::{CloseReason, OpCode};
32use super::{Message, ProtocolError, WsWriter};
33
34/// Websocket client error
35#[derive(Fail, Debug)]
36pub enum ClientError {
37 /// Invalid url
English function-word token "for" lines 77–84
77:33… ed")]
78 Disconnected,
79}
80
81impl From<Error> for ClientError {
82 fn from(err: Error) -> ClientError {
83 ClientError::Http(err)
84 } …
English function-word token "with" lines 137–140
137:2… }
138
139 /// Create new websocket connection with custom `ClientConnector`
140 pub fn with_connector<S: AsRef<str>>(uri: S, conn: Addr<ClientCon …
English function-word token "and" lines 225–230
225:12… f
226 }
227
228 /// Connect to websocket server and do ws handshake
229 pub fn connect(&mut self) -> ClientHandshake {
230 if let Some(e) = s …
Match dispatches on a command-like variable lines 478–483
478:23… finished, opcode, payload) = frame.unpack();
479
480 match opcode {
481 // continuation is not supported
482 OpCode::Continue => {
483 inner …

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.