tokio-socks5 | socks5 server using tokio-rs async/await | Reactive Programming library
kandi X-RAY | tokio-socks5 Summary
kandi X-RAY | tokio-socks5 Summary
socks5 server using tokio-rs async/await
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tokio-socks5
tokio-socks5 Key Features
tokio-socks5 Examples and Code Snippets
Community Discussions
Trending Discussions on tokio-socks5
QUESTION
I would like to create a variation of a SOCKS5 proxy using asynchronous IO. I've done this before in Haskell so I thought would be a good learning challenge. I am starting with the very well-documented SOCKS5 example code.
In the example, the Transfer
struct requires the reader and writer to be of type TcpStream
. In my code these need to be polymorphic, so I started by defining:
ANSWER
Answered 2018-Jan-26 at 15:03tokio_core::net::TcpStream
implements Read
and AsyncRead
for an immutable reference. Your trait does not.
&*self.reader
converts the Rc
to a &T
, which is used as the target of the read
method.
To fix it, you need to either implement the appropriate trait for an immutable reference to your trait or use some kind of interior mutability.
See also:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tokio-socks5
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page