Full binary output

I get data from tcp socket in binary representation. In the 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 the data without ...

Thanks.

+7
source share
2 answers

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

R

Writes data in the same way as ~ p, but takes an additional argument, which is the maximum depth to which it is printed. Everything below this depth has been replaced by ....

Try specifying a different format, for example:

 io:fwrite("~p~n", [Data]). 
+6
source

> rp(Term). Documentation here

This may not be what you want, depending on whether you want to type rp (Term) into the shell or want compiled code to output Term in the shell.

Another thread with several alternatives

+13
source

All Articles