BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface 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

Classes

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 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)
 

Friends

class tcp_server
 

Detailed Description

Definition at line 11 of file tcp_socket.hpp.

Constructor & Destructor Documentation

fc::tcp_socket::tcp_socket ( )

Definition at line 98 of file tcp_socket.cpp.

fc::tcp_socket::tcp_socket ( tcp_socket copy)
delete
fc::tcp_socket::~tcp_socket ( )

Definition at line 100 of file tcp_socket.cpp.

Member Function Documentation

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

Definition at line 160 of file tcp_socket.cpp.

void fc::tcp_socket::close ( )
virtual

Implements fc::ostream.

Definition at line 103 of file tcp_socket.cpp.

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

Definition at line 156 of file tcp_socket.cpp.

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

Definition at line 174 of file tcp_socket.cpp.

bool fc::tcp_socket::eof ( ) const
virtual

Definition at line 112 of file tcp_socket.cpp.

void fc::tcp_socket::flush ( )
virtual

Implements fc::ostream.

Definition at line 102 of file tcp_socket.cpp.

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

Definition at line 28 of file tcp_socket.hpp.

bool fc::tcp_socket::is_open ( ) const

Definition at line 94 of file tcp_socket.cpp.

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

Definition at line 137 of file tcp_socket.cpp.

void fc::tcp_socket::open ( )

Definition at line 89 of file tcp_socket.cpp.

tcp_socket& fc::tcp_socket::operator= ( tcp_socket copy)
delete
size_t fc::tcp_socket::readsome ( char *  buffer,
size_t  max 
)
virtual

istream interface

Implements fc::istream.

Definition at line 147 of file tcp_socket.cpp.

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

Implements fc::istream.

Definition at line 152 of file tcp_socket.cpp.

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

Definition at line 126 of file tcp_socket.cpp.

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

Definition at line 236 of file tcp_socket.cpp.

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

Definition at line 241 of file tcp_socket.cpp.

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

ostream interface

Implements fc::ostream.

Definition at line 116 of file tcp_socket.cpp.

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

Implements fc::ostream.

Definition at line 121 of file tcp_socket.cpp.

Friends And Related Function Documentation

friend class tcp_server
friend

Definition at line 53 of file tcp_socket.hpp.


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