Electroneum
Loading...
Searching...
No Matches
net::socks::client::read Struct Reference
Collaboration diagram for net::socks::client::read:

Public Member Functions

void operator() (const boost::system::error_code error, const std::size_t bytes)

Static Public Member Functions

static boost::asio::mutable_buffers_1 get_buffer (client &self) noexcept

Public Attributes

std::shared_ptr< clientself_

Detailed Description

Definition at line 176 of file socks.cpp.

Member Function Documentation

◆ get_buffer()

boost::asio::mutable_buffers_1 net::socks::client::read::get_buffer ( client & self)
inlinestaticnoexcept

Definition at line 180 of file socks.cpp.

181 {
182 static_assert(sizeof(v4_header) <= sizeof(self.buffer_), "buffer too small for v4 response");
183 return boost::asio::buffer(self.buffer_, sizeof(v4_header));
184 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()()

void net::socks::client::read::operator() ( const boost::system::error_code error,
const std::size_t bytes )
inline

Definition at line 186 of file socks.cpp.

187 {
188 if (self_)
189 {
190 client& self = *self_;
191 if (error)
192 self.done(error, std::move(self_));
193 else if (bytes < self.buffer().size())
194 self.done(socks::error::bad_write, std::move(self_));
195 else
196 boost::asio::async_read(self.proxy_, get_buffer(self), self.strand_.wrap(completed{std::move(self_)}));
197 }
198 }
client(stream_type::socket &&proxy, socks::version ver)
Definition socks.cpp:223
error
Possible errors with socks communication. Defined in https://www.openssh.com/txt/socks4....
Definition socks.h:66
std::shared_ptr< client > self_
Definition socks.cpp:178
static boost::asio::mutable_buffers_1 get_buffer(client &self) noexcept
Definition socks.cpp:180
Here is the call graph for this function:

Member Data Documentation

◆ self_

std::shared_ptr<client> net::socks::client::read::self_

Definition at line 178 of file socks.cpp.


The documentation for this struct was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/net/socks.cpp