[erlang-questions] gen_sctp:connect() always fail
Raimo Niskanen
raimo+erlang-questions@REDACTED
Thu Nov 10 15:04:46 CET 2011
On Thu, Nov 10, 2011 at 02:08:35PM +0100, Victoria Pometsko wrote:
>
> Hello,
>
> I'm trying to work with sctp sockets using gen_sctp module, and faced the following problem:
>
> Client side code:
>
> {ok, S}=gen_sctp:open(5555, [{ip,{127,0,0,1}}, binary, inet, {active, true}, {reuseaddr, true}]).
> %% res : {ok,#Port<0.5931>}
>
> gen_sctp:connect(S, {127,0,0,1}, 6666,[]).
> %% res : {error,{sctp_assoc_change,cant_assoc,0,0,0,0}}
What is the server side code?
Is there a gen_sctp:listen missing?
>
> (if I'm using connect_init(), recv() result is the same)
>
>
> The thing that I also do not understand why example code from http://www.erlang.org/doc/man/gen_sctp.html
> Is also not working for me:
>
> client(localhost, 2006) when is_integer(Port) ->
> {ok,S} = gen_sctp:open(),
> {ok,Assoc} = gen_sctp:connect(S, Host, Port, [{sctp_initmsg,#sctp_initmsg{num_ostreams=5}}]) ....
> %% It fails with: {error,{sctp_assoc_change,cant_assoc,0,0,0,0}}
> ?
>
>
> The environment is:
> SUSE Linux Enterprise Desktop 10 (i586)
> VERSION = 10
> PATCHLEVEL = 1
> LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32"
>
>
> I read at http://www.erlang.org/doc/man/gen_sctp.html that gen_sctp implementation has only been tested on several Linux versions.
>
> So the questions are:
> Can I have such results because of the environment?
> If no, then how do you think, what am I missing?
It should work on SLES 10 SP1.
>
>
>
> With best regards,
> Vic
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list