1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

sitä sun tätä tekeillä, toimii kivasti

This commit is contained in:
Perttu Ahola 2010-11-29 10:52:07 +02:00
parent e8fd5eb8ee
commit c707e00195
19 changed files with 998 additions and 761 deletions

View file

@ -164,7 +164,9 @@ void UDPSocket::Bind(unsigned short port)
if(bind(m_handle, (const sockaddr*)&address, sizeof(sockaddr_in)) < 0)
{
#ifndef DISABLE_ERRNO
dstream<<(int)m_handle<<": Bind failed: "<<strerror(errno)<<std::endl;
#endif
throw SocketException("Failed to bind socket");
}
}
@ -291,7 +293,9 @@ bool UDPSocket::WaitData(int timeout_ms)
}
else if(result < 0){
// Error
#ifndef DISABLE_ERRNO
dstream<<(int)m_handle<<": Select failed: "<<strerror(errno)<<std::endl;
#endif
#ifdef _WIN32
dstream<<(int)m_handle<<": WSAGetLastError()="<<WSAGetLastError()<<std::endl;
#endif