[erlang-questions] Sending a large block of binary data from c to erlang

Joe Armstrong erlang@REDACTED
Wed Nov 21 22:47:12 CET 2012


Very strange - I think you'll have to post a bit more code in order to
debug this. 5 minutes is a very long time (unless you have a very very slow
machine) - can you isolate the problem into a smaller test case that
reproduces the problem?

Cheers

/Joe

On Wed, Nov 21, 2012 at 7:18 PM, Richard Evans <
richardprideauxevans@REDACTED> wrote:

> encode({load_instance_from_binary, GameIndex, BinaryBlock}) ->
>     Result = lists:append([[?SERVER_INSTRUCTION_LOAD_INSTANCE_FROM_BINARY
> | convertToFourBytes(GameIndex)],
> convertToFourBytes(byte_size(BinaryBlock)),



> binary:bin_to_list(BinaryBlock) <- this line is unecessary

replace with BinaryBlock
lists get flattened on output so you can just
add the binary "as is" without conversion to a list



> ]),
>     Result.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121121/72d0f20a/attachment.htm>


More information about the erlang-questions mailing list