summaryrefslogtreecommitdiff
path: root/src/tcp_socket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tcp_socket.cpp')
-rw-r--r--src/tcp_socket.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tcp_socket.cpp b/src/tcp_socket.cpp
index 6b10c1d..eb8b032 100644
--- a/src/tcp_socket.cpp
+++ b/src/tcp_socket.cpp
@@ -69,9 +69,9 @@ zmq::fd_t zmq::tcp_socket_t::get_fd ()
return s;
}
-int zmq::tcp_socket_t::write (const void *data, int size)
+int zmq::tcp_socket_t::write (const void *data_, size_t size_)
{
- int nbytes = send (s, (char*) data, size, 0);
+ int nbytes = send (s, (char*) data_, (int) size_, 0);
// If not a single byte can be written to the socket in non-blocking mode
// we'll get an error (this may happen during the speculative write).
@@ -93,9 +93,9 @@ int zmq::tcp_socket_t::write (const void *data, int size)
return (size_t) nbytes;
}
-int zmq::tcp_socket_t::read (void *data, int size)
+int zmq::tcp_socket_t::read (void *data_, size_t size)
{
- int nbytes = recv (s, (char*) data, size, 0);
+ int nbytes = recv (s, (char*) data_, (int) size_, 0);
// If not a single byte can be read from the socket in non-blocking mode
// we'll get an error (this may happen during the speculative read).
@@ -176,9 +176,9 @@ zmq::fd_t zmq::tcp_socket_t::get_fd ()
return s;
}
-int zmq::tcp_socket_t::write (const void *data, int size)
+int zmq::tcp_socket_t::write (const void *data_, size_t size_)
{
- ssize_t nbytes = send (s, data, size, 0);
+ ssize_t nbytes = send (s, data_, size_, 0);
// Several errors are OK. When speculative write is being done we may not
// be able to write a single byte to the socket. Also, SIGSTOP issued
@@ -195,9 +195,9 @@ int zmq::tcp_socket_t::write (const void *data, int size)
return (size_t) nbytes;
}
-int zmq::tcp_socket_t::read (void *data, int size)
+int zmq::tcp_socket_t::read (void *data_, size_t size_)
{
- ssize_t nbytes = recv (s, data, size, 0);
+ ssize_t nbytes = recv (s, data_, size_, 0);
// Several errors are OK. When speculative read is being done we may not
// be able to read a single byte to the socket. Also, SIGSTOP issued