diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-11 17:52:25 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-11 17:52:25 +0200 |
commit | 28c9cac2e92011e2f7e6f23e93e8a5d9480a0922 (patch) | |
tree | ad81473619ba5b9c18e925323264f58982311662 /shard/lib/net/tcpconn.ex | |
parent | e5a7330d0526efb592e200ab96c3f33585ae8d02 (diff) | |
download | shard-28c9cac2e92011e2f7e6f23e93e8a5d9480a0922.tar.gz shard-28c9cac2e92011e2f7e6f23e93e8a5d9480a0922.zip |
Fix initiation issues
Diffstat (limited to 'shard/lib/net/tcpconn.ex')
-rw-r--r-- | shard/lib/net/tcpconn.ex | 5 |
1 files changed, 5 insertions, 0 deletions
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) |