Implement protocol encryption #2
@ -216,6 +216,11 @@ defmodule Amethyst.Minecraft.Read do
|
|||||||
{[data | acc], rest, :reversed}
|
{[data | acc], rest, :reversed}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def byte_array({acc, data, :reversed}) do
|
||||||
|
{[length], rest} = start(data) |> varint |> stop
|
||||||
|
raw({acc, rest, :reversed}, length)
|
||||||
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Reads a varint. `read` tracks the number of bytes read and `nacc` tracks the number being read.
|
Reads a varint. `read` tracks the number of bytes read and `nacc` tracks the number being read.
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user