diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-03-25 08:37:08 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-03-25 08:37:08 -0700 |
| commit | 328be8f8461462ad88a639822b7df32f7b92211f (patch) | |
| tree | 69c1d4dec9b0f0c885f5c3c922e7c0bada582181 /node/TcpSocket.cpp | |
| parent | d9b91758e044a70242dee1697345cd2ee4a096d4 (diff) | |
| download | infinitytier-328be8f8461462ad88a639822b7df32f7b92211f.tar.gz infinitytier-328be8f8461462ad88a639822b7df32f7b92211f.zip | |
Make Windows build, add (untested) Windows named pipe based IPC code.
Diffstat (limited to 'node/TcpSocket.cpp')
| -rw-r--r-- | node/TcpSocket.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node/TcpSocket.cpp b/node/TcpSocket.cpp index dce7d3a7..a422dec6 100644 --- a/node/TcpSocket.cpp +++ b/node/TcpSocket.cpp @@ -106,7 +106,7 @@ bool TcpSocket::send(const InetAddress &to,const void *msg,unsigned int msglen) // If no output was enqueued before this, try to send() it and then // start a queued write if any remains after that. - int n = (int)::send(_sock,_outbuf,_outptr,0); + int n = (int)::send(_sock,(const char *)_outbuf,_outptr,0); if (n > 0) memmove(_outbuf,_outbuf + (unsigned int)n,_outptr -= (unsigned int)n); @@ -125,7 +125,7 @@ bool TcpSocket::notifyAvailableForRead(const SharedPtr<Socket> &self,SocketManag // will not be called concurrently since only SocketManager::poll() calls this - int n = (int)::recv(_sock,buf,sizeof(buf),0); + int n = (int)::recv(_sock,(char *)buf,sizeof(buf),0); if (n <= 0) return false; // read error, stream probably closed @@ -163,7 +163,7 @@ bool TcpSocket::notifyAvailableForWrite(const SharedPtr<Socket> &self,SocketMana _connecting = false; if (_outptr) { - int n = (int)::send(_sock,_outbuf,_outptr,0); + int n = (int)::send(_sock,(const char *)_outbuf,_outptr,0); if (n < 0) { switch(errno) { #ifdef EBADF |
