Add support NXT_RESUME (#9)

This commit is contained in:
Eishun Kondoh 2018-08-29 07:17:51 +09:00 committed by GitHub
parent 4bd8ba994f
commit a3ec836e42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 730 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)}