}
catch(SendFailedException &e)
{
- derr_con<<"Receive(): SendFailedException; peer_id="
- <<peer_id<<std::endl;
}
} // for
}
void Connection::RawSend(const BufferedPacket &packet)
{
- m_socket.Send(packet.address, *packet.data, packet.data.getSize());
+ try{
+ m_socket.Send(packet.address, *packet.data, packet.data.getSize());
+ } catch(SendFailedException &e){
+ derr_con<<"Connection::RawSend(): SendFailedException: "
+ <<packet.address.serializeString()<<std::endl;
+ }
}
void Connection::RunTimeouts(float dtime)
freeaddrinfo(resolved);
}
-std::string Address::serializeString()
+std::string Address::serializeString() const
{
unsigned int a, b, c, d;
a = (m_address & 0xFF000000)>>24;
void setPort(unsigned short port);
void print(std::ostream *s) const;
void print() const;
- std::string serializeString();
+ std::string serializeString() const;
private:
unsigned int m_address;
unsigned short m_port;