+// ***************************************************************************
+// TcpSocketEngine_unix_p.cpp (c) 2011 Derek Barnett
+// Marth Lab, Department of Biology, Boston College
+// ---------------------------------------------------------------------------
+// Last modified: 10 November 2011 (DB)
+// ---------------------------------------------------------------------------
+// Provides low-level implementation of TCP I/O for all UNIX-like systems
+// ***************************************************************************
+
#include "api/internal/io/TcpSocketEngine_p.h"
#include "api/internal/io/NetUnix_p.h"
using namespace BamTools;
bool TcpSocketEngine::nativeCreateSocket(HostAddress::NetworkProtocol protocol) {
// get protocol value for requested protocol type
- const int protocolNum = ( (protocol == HostAddress::IPv6Protocol) ? AF_INET6 : AF_INET );
+ const int protocolNum = ( (protocol == HostAddress::IPv6Protocol) ? AF_INET6
+ : AF_INET );
// attempt to create socket
int socketFd = socket(protocolNum, SOCK_STREAM, IPPROTO_TCP);
break;
}
}
-
return static_cast<int64_t>(ret);
}
-// negative value for msecs will block (forever) until
+// negative value for msecs will block (forever) until ready
int TcpSocketEngine::nativeSelect(int msecs, bool isRead) const {
// set up FD set
break;
}
}
-
return static_cast<int64_t>(writtenBytes);
}