tres/secure_channel: Add a new feature for blocking sending

This commit is contained in:
Eishun Kondoh 2018-05-02 02:49:58 +09:00
parent 516bb182bb
commit bc3c65cfa9
6 changed files with 27 additions and 11 deletions

View file

@ -18,6 +18,13 @@ defmodule Tres.SwitchRegistry do
lookup_pid({datapath_id, 0})
end
def send_message(message, dpid, _blocking = true) do
blocking_send_message(message, dpid)
end
def send_message(message, dpid, _blocking) do
send_message(message, dpid)
end
def send_message(message, {_dpid, _aux_id} = datapath_id) do
Registry.dispatch(__MODULE__, datapath_id, &do_send_message(&1, message))
end