Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Full binary output

Tags:

binary

erlang

I'm receiving data from tcp socket in binary view. In erlang shell i see:

<<18,0,0,0,53,9,116,101,115,116,32,103,97,109,101,1,0,0,1,
  134,160,0,3,13,64,0,0,0,20,...>>

How can i show all data without ...

Thank you.

like image 225
0xAX Avatar asked Apr 13 '11 05:04

0xAX


2 Answers

> rp(Term). Documentation here

This might not be what you want depending if you want to input rp(Term) in shell or want compiled code to output Term in shell.

Another thread with some more alternatives

like image 100
D.Nibon Avatar answered Oct 06 '22 00:10

D.Nibon


Take a look at the format part of io:fwrite. I assume that your data is output with format P or W:

P

Writes data in the same way as ~p, but takes an extra argument which is the maximum depth to which terms are printed. Anything below this depth is replaced with ....

Try specifying a different format, for example:

io:fwrite("~p~n", [Data]).
like image 23
Anders Lindahl Avatar answered Oct 06 '22 01:10

Anders Lindahl