[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: working with UDP sockets
On Feb 20, 2004, at 11:26 AM, Claudio Jeker wrote:
> On Fri, Feb 20, 2004 at 11:13:25AM -0700, Balazs Nagy wrote:
[snip]
>> 23414 cvm-testclient CALL connect(0x3,0xcfbf8684,0x10)
>> 23414 cvm-testclient RET connect 0
>
> Here you connect your udp socket to the remote side.
[snip]
>> sendto(0x3,0x3c003440,0x15,0,0xcfbf8634,0x10)
>> 23414 cvm-testclient RET sendto -1 errno 56 Socket is already
>> connected
>
> and then you use sendto... to connect again? That will not work as the
> error trys to tell you.
> Either use connect() and send() or just sendto() but not both together.
Thanks both to Cedric and Claudio! I guess the socket library on
Linux behaves badly...
Cheers,
Balázs
http://www.thenewpush.com