Networking

EsAddressResolve

EsError EsAddressResolve(STRING domain, uint32_t flags, EsAddress *address);

Resolves a domain name into an EsAddress. Returns ES_SUCCESS on success.

EsConnectionClose

void EsConnectionClose(EsConnection *connection);

Closes the connection and unmaps its buffers.

EsConnectionNotify

void EsConnectionNotify(EsConnection *connection);

Tells the system that the application has changed the connection buffers.

EsConnectionOpen

EsError EsConnectionOpen(EsConnection *connection, EsConnectionOpenFlags flags);

Opens a connection to the address stored in the connection. With ES_CONNECTION_OPEN_WAIT, blocks until the connection is open. Returns ES_SUCCESS on success.

EsConnectionPoll

void EsConnectionPoll(EsConnection *connection);

Updates the connection state. Call it before reading or writing.

EsConnectionRead

EsError EsConnectionRead(EsConnection *connection, void *buffer, size_t bufferBytes, size_t *bytesRead);

Returns the number of bytes copied into the buffer.

EsConnectionWriteSync

EsError EsConnectionWriteSync(EsConnection *connection, const void *data, size_t dataBytes);

Waits until all the data has been written into the send buffer. This does *not* flush the send buffer.