Tcpsocket::write question
Philippe Torrelli
philippe.torrelli at alcatel.fr
Mon Oct 30 19:52:07 CET 2006
Hello,
Trying to understand what the define
_MSC_VER
Is for in:
int32_t TCPSocket::write(string data){
#ifdef _MSC_VER_
return ::_write(fd, data.c_str(), (unsigned int)data.length());
#else
return ::send(fd, data.c_str(), data.length(), 0);
#endif
}
Here, in TCPSocket::write(string data)
The ::_write thing makes crt throws assertions
when built with visual studio 2005 ..
( but with ::send minisip works )
Is it for windows CE, for mingw, or just obsolete ?
I just did simple tests with textui, I don't think I stepped
in a scenario where the copy constructor was used before the
write is done so maybe it's related ..
Also noticed that it's not coherent with
int32_t TCPSocket::write(const void *buf, int32_t count){
return ::write(fd, buf, count);
}
Philippe Torrelli
More information about the Minisip-devel
mailing list