Electroneum
Loading...
Searching...
No Matches
net::socks::client::async_close Struct Reference

#include <socks.h>

Collaboration diagram for net::socks::client::async_close:

Public Member Functions

void operator() (boost::system::error_code error=boost::system::error_code{})

Public Attributes

std::shared_ptr< clientself_

Detailed Description

Callback for closing socket. Thread-safe with *send functions; never blocks (uses strands).

Definition at line 199 of file socks.h.

Member Function Documentation

◆ operator()()

void net::socks::client::async_close::operator() ( boost::system::error_code error = boost::system::error_code{})

Definition at line 316 of file socks.cpp.

317 {
318 if (self_ && error != boost::system::errc::operation_canceled)
319 {
320 const std::shared_ptr<client> self = std::move(self_);
321 self->strand_.dispatch([self] ()
322 {
323 if (self && self->proxy_.is_open())
324 {
325 self->proxy_.shutdown(boost::asio::ip::tcp::socket::shutdown_both);
326 self->proxy_.close();
327 }
328 });
329 }
330 }
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.h:201

Member Data Documentation

◆ self_

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

Definition at line 201 of file socks.h.


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