aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/salticidae/network.h')
-rw-r--r--include/salticidae/network.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/salticidae/network.h b/include/salticidae/network.h
index 6556d22..2bc445c 100644
--- a/include/salticidae/network.h
+++ b/include/salticidae/network.h
@@ -210,7 +210,6 @@ class ClientNetwork: public MsgNetwork<OpcodeType> {
template<typename MsgType>
void send_msg(const MsgType &msg, const NetAddr &addr);
- conn_t connect(const NetAddr &addr) = delete;
};
class PeerNetworkError: public SalticidaeError {
@@ -387,11 +386,13 @@ void MsgNetwork<OpcodeType>::Conn::on_read() {
bytearray_t data = recv_buffer.pop(len);
msg.set_payload(std::move(data));
msg_state = Conn::HEADER;
+#ifndef SALTICIDAE_NOCHECKSUM
if (!msg.verify_checksum())
{
SALTICIDAE_LOG_WARN("checksums do not match, dropping the message");
return;
}
+#endif
auto it = mn->handler_map.find(msg.get_opcode());
if (it == mn->handler_map.end())
SALTICIDAE_LOG_WARN("unknown opcode: %s",