Add support NXT_RESUME (#7)

* Add support NXT_RESUME
This commit is contained in:
Eishun Kondoh 2018-08-29 00:00:53 +09:00 committed by GitHub
parent 2c4d247a2f
commit 95d2f2e87c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 735 additions and 71 deletions

View file

@ -24,8 +24,8 @@ defmodule Openflow.Hello do
def supported_version?(%Hello{elements: elements}) do
elements
|> Enum.reduce([], fn({:versionbitmap, versions}, acc) -> acc ++ versions end)
|> Enum.any?(fn(version) -> version == 4 end)
|> Enum.reduce([], fn {:versionbitmap, versions}, acc -> acc ++ versions end)
|> Enum.any?(fn version -> version == 4 end)
end
def read(binary), do: %Hello{elements: decode([], binary)}