// TcpSocket_p.cpp (c) 2011 Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
-// Last modified: 8 December 2011 (DB)
+// Last modified: 5 January 2012 (DB)
// ---------------------------------------------------------------------------
// Provides basic TCP I/O interface
// ***************************************************************************
using namespace BamTools::Internal;
#include <algorithm>
+#include <climits>
#include <sstream>
#include <vector>
using namespace std;
// prep result byte buffer
ByteArray result;
-
- size_t bufferMax = ((max > static_cast<int64_t>(string::npos)) ? string::npos : static_cast<size_t>(max));
+ size_t bufferMax = ((max > static_cast<int64_t>(UINT_MAX))
+ ? UINT_MAX : static_cast<size_t>(max));
result.Resize(bufferMax);
// read data
if ( result.Size() == 0 ) {
if ( bufferMax == 0 )
- bufferMax = string::npos;
+ bufferMax = UINT_MAX;
result.Resize(1);