class SocketInterface

Defined at line 12 of file ../../src/virtualization/tests/lib/socket.h

Public Methods

zx_status_t Send (zx::time deadline, const std::string & message)

Sends a message to the socket

Blocks until the entire message is written to the socket, or the given

timeout has occurred. A non-blocking send can be performed by setting

deadline to ZX_TIME_INFINITE_PAST.

If an error or timeout occurs, it is unspecified how much of "message"

has been tranmitted to the socket.

zx_status_t Receive (zx::time deadline, std::string * result)

Read one or more bytes from the socket, putting the result in

|result|.

A non-blocking receive can be performed by setting deadline to

ZX_TIME_INFINITE_PAST. |result| must always be non-null.

Returns when one or more bytes has been received, or the given timeout has

passed.

void SocketInterface ()

Defined at line 14 of file ../../src/virtualization/tests/lib/socket.h

zx_status_t WaitForClosed (zx::time deadline)

Waits for the socket interface to be closed, or a |deadline| is reached.

void ~SocketInterface ()

Defined at line 15 of file ../../src/virtualization/tests/lib/socket.h