BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Classes | Public Member Functions | Friends | List of all members
fc::tcp_socket Class Reference

#include <tcp_socket.hpp>

Inheritance diagram for fc::tcp_socket:
fc::iostream fc::ostream fc::istream


class  impl

Public Member Functions

 tcp_socket ()
 tcp_socket (tcp_socket &copy)=delete
 ~tcp_socket ()
tcp_socketoperator= (tcp_socket &copy)=delete
void connect_to (const fc::ip::endpoint &remote_endpoint)
void bind (const fc::ip::endpoint &local_endpoint)
void enable_keep_alives (const fc::microseconds &interval)
void set_io_hooks (tcp_socket_io_hooks *new_hooks)
void set_reuse_address (bool enable=true)
fc::ip::endpoint remote_endpoint () const
fc::ip::endpoint local_endpoint () const
void get (char &c)
void open ()
bool is_open () const
virtual char get ()
void get (char &c)
virtual size_t readsome (char *buffer, size_t max)
virtual size_t readsome (const std::shared_ptr< char > &buffer, size_t max, size_t offset)
virtual bool eof () const
virtual size_t writesome (const char *buffer, size_t len)
virtual size_t writesome (const std::shared_ptr< const char > &buffer, size_t len, size_t offset)
virtual void flush ()
virtual void close ()
- Public Member Functions inherited from fc::ostream
virtual ~ostream ()
void put (char c)
ostreamwrite (const char *buf, size_t len)
ostreamwrite (const std::shared_ptr< const char > &buf, size_t len, size_t offset=0)
- Public Member Functions inherited from fc::istream
virtual ~istream ()
istreamread (char *buf, size_t len)
istreamread (const std::shared_ptr< char > &buf, size_t len, size_t offset=0)
virtual char get ()
void get (char &c)


class tcp_server

Detailed Description

Definition at line 14 of file tcp_socket.hpp.

Constructor & Destructor Documentation

◆ tcp_socket() [1/2]

fc::tcp_socket::tcp_socket ( )

Definition at line 98 of file tcp_socket.cpp.

◆ tcp_socket() [2/2]

fc::tcp_socket::tcp_socket ( tcp_socket copy)

◆ ~tcp_socket()

fc::tcp_socket::~tcp_socket ( )

Definition at line 100 of file tcp_socket.cpp.

Member Function Documentation

◆ bind()

void fc::tcp_socket::bind ( const fc::ip::endpoint local_endpoint)

Definition at line 160 of file tcp_socket.cpp.

◆ close()

void fc::tcp_socket::close ( )

Implements fc::ostream.

Definition at line 103 of file tcp_socket.cpp.

◆ connect_to()

void fc::tcp_socket::connect_to ( const fc::ip::endpoint remote_endpoint)

Definition at line 156 of file tcp_socket.cpp.

◆ enable_keep_alives()

void fc::tcp_socket::enable_keep_alives ( const fc::microseconds interval)

Definition at line 174 of file tcp_socket.cpp.

◆ eof()

bool fc::tcp_socket::eof ( ) const

Definition at line 112 of file tcp_socket.cpp.

◆ flush()

void fc::tcp_socket::flush ( )

Implements fc::ostream.

Definition at line 102 of file tcp_socket.cpp.

◆ get() [1/3]

char fc::istream::get

Definition at line 267 of file iostream.cpp.

◆ get() [2/3]

void fc::istream::get

Definition at line 33 of file iostream.hpp.

◆ get() [3/3]

void fc::tcp_socket::get ( char &  c)

Definition at line 31 of file tcp_socket.hpp.

◆ is_open()

bool fc::tcp_socket::is_open ( ) const

Definition at line 94 of file tcp_socket.cpp.

◆ local_endpoint()

fc::ip::endpoint fc::tcp_socket::local_endpoint ( ) const

Definition at line 137 of file tcp_socket.cpp.

◆ open()

void fc::tcp_socket::open ( )

Definition at line 89 of file tcp_socket.cpp.

◆ operator=()

tcp_socket& fc::tcp_socket::operator= ( tcp_socket copy)

◆ readsome() [1/2]

size_t fc::tcp_socket::readsome ( char *  buffer,
size_t  max 

istream interface

Implements fc::istream.

Definition at line 147 of file tcp_socket.cpp.

◆ readsome() [2/2]

size_t fc::tcp_socket::readsome ( const std::shared_ptr< char > &  buffer,
size_t  max,
size_t  offset 

Implements fc::istream.

Definition at line 152 of file tcp_socket.cpp.

◆ remote_endpoint()

fc::ip::endpoint fc::tcp_socket::remote_endpoint ( ) const

Definition at line 126 of file tcp_socket.cpp.

◆ set_io_hooks()

void fc::tcp_socket::set_io_hooks ( tcp_socket_io_hooks new_hooks)

Definition at line 236 of file tcp_socket.cpp.

◆ set_reuse_address()

void fc::tcp_socket::set_reuse_address ( bool  enable = true)

Definition at line 241 of file tcp_socket.cpp.

◆ writesome() [1/2]

size_t fc::tcp_socket::writesome ( const char *  buffer,
size_t  len 

ostream interface

Implements fc::ostream.

Definition at line 116 of file tcp_socket.cpp.

◆ writesome() [2/2]

size_t fc::tcp_socket::writesome ( const std::shared_ptr< const char > &  buffer,
size_t  len,
size_t  offset 

Implements fc::ostream.

Definition at line 121 of file tcp_socket.cpp.

Friends And Related Function Documentation

◆ tcp_server

friend class tcp_server

Definition at line 56 of file tcp_socket.hpp.

The documentation for this class was generated from the following files: