summaryrefslogtreecommitdiff
path: root/src/tcp_socket.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-05-15 13:12:09 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-05-15 13:12:09 +0200
commit49df2f416cd43e9e18f3dbd964271c5cca835729 (patch)
tree815d659e54170a47fd812bc55bbda6b9f0ec7581 /src/tcp_socket.cpp
parent49387874efe790713f4a090e03a97212f4889163 (diff)
Fixes warning when compiling with MSVC on Win64
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
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