Android-cuttlefish cvd tool
|
Public Member Functions | |
TcpSocket (cutils_socket_t sock) | |
bool | Send (const void *data, size_t length) override |
bool | Send (std::vector< cutils_socket_buffer_t > buffers) override |
ssize_t | Receive (void *data, size_t length, int timeout_ms) override |
std::unique_ptr< Socket > | Accept () override |
![]() | |
virtual | ~Socket () |
virtual bool | Send (const void *data, size_t length)=0 |
virtual bool | Send (std::vector< cutils_socket_buffer_t > buffers)=0 |
virtual ssize_t | Receive (void *data, size_t length, int timeout_ms)=0 |
virtual ssize_t | ReceiveAll (void *data, size_t length, int timeout_ms) |
bool | ReceiveTimedOut () |
virtual int | Close () |
virtual std::unique_ptr< Socket > | Accept () |
int | GetLocalPort () |
Private Member Functions | |
DISALLOW_COPY_AND_ASSIGN (TcpSocket) | |
Additional Inherited Members | |
![]() | |
enum class | Protocol { kTcp , kUdp } |
![]() | |
static std::string | GetErrorMessage () |
static std::unique_ptr< Socket > | NewClient (Protocol protocol, const std::string &hostname, int port, std::string *error) |
static std::unique_ptr< Socket > | NewServer (Protocol protocol, int port) |
![]() | |
Socket (cutils_socket_t sock) | |
bool | WaitForRecv (int timeout_ms) |
![]() | |
cutils_socket_t | sock_ = INVALID_SOCKET |
bool | receive_timed_out_ = false |
std::function< ssize_t(cutils_socket_t, cutils_socket_buffer_t *, size_t)> | socket_send_buffers_function_ = &socket_send_buffers |
|
inlineexplicit |
|
private |
|
overridevirtual |
Implements Socket.
|
overridevirtual |
Implements Socket.
|
overridevirtual |
Implements Socket.