Fix to accept transaction_id to all message structs

This commit is contained in:
Eishun Kondoh 2018-03-22 23:49:03 +09:00
parent bb74f3d8c4
commit 4803c61061
29 changed files with 118 additions and 34 deletions

View file

@ -13,7 +13,13 @@ defmodule Openflow.Echo.Request do
def ofp_type, do: 2
def new(data \\ "") do
def new(options) when is_list(options) do
%Request{
xid: options[:xid] || 0,
data: options[:data] || ""
}
end
def new(data) when is_binary(data) do
%Request{data: data}
end