From 28c9cac2e92011e2f7e6f23e93e8a5d9480a0922 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 11 Oct 2018 17:52:25 +0200 Subject: Fix initiation issues --- shard/lib/net/tcpconn.ex | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shard/lib/net/tcpconn.ex') diff --git a/shard/lib/net/tcpconn.ex b/shard/lib/net/tcpconn.ex index 25dc839..bd169aa 100644 --- a/shard/lib/net/tcpconn.ex +++ b/shard/lib/net/tcpconn.ex @@ -284,6 +284,11 @@ defmodule SNet.TCPConn do end end + def handle_cast({:callback, cb}, state) do + cb.(self()) + {:noreply, state} + end + def handle_cast({:send_msg, msg}, state) do msgbin = :erlang.term_to_binary msg enc = :enacl.secretbox(msgbin, state.nonce_send, state.secret_send) -- cgit v1.2.3