[erlang-questions] inet:getopts

David Mercer <>
Wed Aug 8 18:11:10 CEST 2007


Yes, I am an idiot.  The problem, of course, is that S is the tuple
{ok,#Port<0.110>}.  It works fine when I actually pay attention:

 

32> {ok, S} = gen_tcp:connect("localhost", 1210, [{active, once}]).

{ok,#Port<0.113>}

33> inet:getopts(S, [active]).                                     

{ok,[{active,once}]}

 

Sorry for the waste of bandwidth.

 

David

 

  _____  

From: David Mercer [mailto:] 
Sent: Wednesday, August 08, 2007 11:06
To: 'Erlang Questions'
Subject: inet:getopts

 

I can never get any good response out of inet:getopts/2:

 

1> S = gen_tcp:connect("localhost", 1210, [{active, once}]).

{ok,#Port<0.110>}

2> inet:getopts(S, [active]).                               

 

=ERROR REPORT==== 8-Aug-2007::10:36:53 ===

Error in process <0.62.0> with exit value:
{function_clause,[{prim_inet,getopts,

[{ok,#Port<0.110>},[active]]},{erl_eval,do_apply,5},{shell,exprs,6},{shell,e
val_

loop,3}]}

 

** exited:
{function_clause,[{prim_inet,getopts,[{ok,#Port<0.110>},[active]]},

                             {erl_eval,do_apply,5},

                             {shell,exprs,6},

                             {shell,eval_loop,3}]} **

 

I have confirmed that I am successfully making the connection.  What am I
doing wrong?  I do not understand the error report.  Please advise.
Thank-you.

 

David Mercer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070808/49e2ec3c/attachment.html>


More information about the erlang-questions mailing list