Boost logo

Boost :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-08-19 19:26:31


--- Jeremy Maitin-Shepard <jbms_at_[hidden]> wrote:
> Well, one possibility is to just use the names `read' and `write'.
> If necessary, these functions can be distinguished from the
> connected-socket versions by the extra parameter. Alternatively, you
> could use the names `unconnected_read' and `unconnected_write'.

After pondering this for a while, I think what i'm going to do is:

- Rename the Sync_Recv_Stream concept to Sync_Read_Stream, and change
it's recv() to be read().

- Rename the Sync_Send_Stream concept to Sync_Write_Stream, and change
it's send() to be write().

- Rename the Async_Recv_Stream concept to Async_Read_Stream, and change
it's async_recv() to be async_read().

- Rename the Async_Send_Stream concept to Async_Write_Stream, and
change it's async_send() to by async_write().

- The free functions asio::send*, asio::async_send*, asio::recv* and
asio::async_recv* will be renamed to use write and read.

- Add new send and receive functions to the stream_socket which also
allow "flags" to be passed (something missing at the moment).

- Rename dgram_socket's functions sendto to send_to, async_sendto to
async_send_to, recvfrom to receive_from, and async_recvfrom to
async_receive_from. These functions will also be changed to allow the
flags to be passed.

- Rename dgram_socket to datagram_socket.

These concepts and the stream_socket class will then mirror the way
sockets and other resources can be used on UNIX systems (where you can
call read() or write() on a socket just as with a file, or recv() and
send() if you need to pass flags).

Cheers,
Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk