Use read() instead of recv() such that non-sockets can be used for reads.

This commit is contained in:
Michael Jumper 2012-07-23 01:41:50 -07:00
parent 3cca318f8e
commit 5bd42295ca

View File

@ -373,11 +373,10 @@ int __guac_fill_instructionbuf(guac_socket* socket) {
int retval;
/* Attempt to fill buffer */
retval = recv(
retval = read(
socket->fd,
socket->__instructionbuf + socket->__instructionbuf_used_length,
socket->__instructionbuf_size - socket->__instructionbuf_used_length,
0
socket->__instructionbuf_size - socket->__instructionbuf_used_length
);
/* Set guac_error if recv() unsuccessful */