[erlang-questions] how does an erlang Socket/Port look from inside?

Dror Mein drormein@REDACTED
Wed Mar 26 17:38:17 CET 2014

for some reason it blocks to wait while on listen...

On Wednesday, March 26, 2014 6:00 PM, Loïc Hoguin <essen@REDACTED> wrote:
How about opening a socket on a random port?

{ok, S} = gen_tcp:listen(0, [{active, false}]).

On 03/26/2014 04:45 PM, Dror Mein wrote:
> Hey all,
> I want to eunit+meck test a simple telnet client which uses the guard
> is_port(Port).
> how can I pass something in meck:expect/4 that will pass the guard?
> is it a record/reference that I can make up?
> can I use hd(erlang:ports()) -> #Port<0.0> without blowing up?
> Thanks
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Loïc Hoguin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140326/c31ba9a2/attachment.htm>

More information about the erlang-questions mailing list