7

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.

Crozin
  • 43,890
  • 13
  • 88
  • 135
0xAX
  • 20,957
  • 26
  • 117
  • 206

2 Answers2

13

> 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

Community
  • 1
  • 1
D.Nibon
  • 2,883
  • 1
  • 19
  • 17
6

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]).
Anders Lindahl
  • 41,582
  • 9
  • 89
  • 93