SFML community forums
Help => Network => Topic started by: bloodust on March 23, 2011, 09:49:35 am
-
Why is the parameter not const in this function ?
Socket::Status TcpSocket::Send(Packet& packet)
Why is this member function not const? It does not modify the object and it returns const data.
const char* Packet::OnSend(std::size_t& size)
-
It's not const so that derived Packet classes can implement in-place modifications, rather than being forced to copy their data on every call to Send().