src/share/vm/utilities/ostream.cpp
Print this page
rev 3227 : 7157695: Add windows implementation of socket interface
Summary: Add imlp using winsock and changing some types.
Reviewed-by:
Contributed-by: nils.eliasson@oracle.com
*** 1019,1029 ****
return os::recv(_socket, buf, (int)len, 0);
}
void networkStream::flush() {
if (size() != 0) {
! int result = os::raw_send(_socket, (char *)base(), size(), 0);
assert(result != -1, "connection error");
assert(result == (int)size(), "didn't send enough data");
}
reset();
}
--- 1019,1030 ----
return os::recv(_socket, buf, (int)len, 0);
}
void networkStream::flush() {
if (size() != 0) {
! assert(!(size()>>31),"size() should be limited by buffer_max and never need 32 bits");
! int result = os::raw_send(_socket, (char *)base(), (int)size(), 0);
assert(result != -1, "connection error");
assert(result == (int)size(), "didn't send enough data");
}
reset();
}