BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
#include <stcp_socket.hpp>
Public Member Functions | |
stcp_socket () | |
~stcp_socket () | |
fc::tcp_socket & | get_socket () |
void | accept () |
void | connect_to (const fc::ip::endpoint &remote_endpoint) |
void | bind (const fc::ip::endpoint &local_endpoint) |
virtual size_t | readsome (char *buffer, size_t max) |
virtual size_t | readsome (const std::shared_ptr< char > &buf, size_t len, 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 > &buf, size_t len, size_t offset) |
virtual void | flush () |
virtual void | close () |
void | get (char &c) |
fc::sha512 | get_shared_secret () const |
Public Member Functions inherited from fc::ostream | |
virtual | ~ostream () |
void | put (char c) |
ostream & | write (const char *buf, size_t len) |
ostream & | write (const std::shared_ptr< const char > &buf, size_t len, size_t offset=0) |
Public Member Functions inherited from fc::istream | |
virtual | ~istream () |
istream & | read (char *buf, size_t len) |
istream & | read (const std::shared_ptr< char > &buf, size_t len, size_t offset=0) |
virtual char | get () |
void | get (char &c) |
Uses ECDH to negotiate a aes key for communicating with other nodes on the network.
Definition at line 35 of file stcp_socket.hpp.
graphene::net::stcp_socket::stcp_socket | ( | ) |
Definition at line 39 of file stcp_socket.cpp.
graphene::net::stcp_socket::~stcp_socket | ( | ) |
Definition at line 47 of file stcp_socket.cpp.
void graphene::net::stcp_socket::accept | ( | ) |
Definition at line 180 of file stcp_socket.cpp.
void graphene::net::stcp_socket::bind | ( | const fc::ip::endpoint & | local_endpoint | ) |
Definition at line 78 of file stcp_socket.cpp.
|
virtual |
Implements fc::ostream.
Definition at line 172 of file stcp_socket.cpp.
void graphene::net::stcp_socket::connect_to | ( | const fc::ip::endpoint & | remote_endpoint | ) |
Definition at line 72 of file stcp_socket.cpp.
|
virtual |
Definition at line 124 of file stcp_socket.cpp.
|
virtual |
Implements fc::ostream.
Definition at line 166 of file stcp_socket.cpp.
|
inline |
Definition at line 57 of file stcp_socket.hpp.
|
inline |
Definition at line 58 of file stcp_socket.hpp.
|
inline |
Definition at line 40 of file stcp_socket.hpp.
|
virtual |
This method must read at least 16 bytes at a time from the underlying TCP socket so that it can decrypt them. It will buffer any left-over.
Implements fc::istream.
Definition at line 88 of file stcp_socket.cpp.
|
virtual |
Implements fc::istream.
Definition at line 119 of file stcp_socket.cpp.
|
virtual |
every sizeof(crypt_buf) bytes the aes channel has an error and doesn't decrypt properly... disable for now because we are going to upgrade to something better.
Implements fc::ostream.
Definition at line 129 of file stcp_socket.cpp.
|
virtual |
Implements fc::ostream.
Definition at line 161 of file stcp_socket.cpp.