This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: connect() does not work with UNIX domain datagram sockets


On Tue, Apr 02, 2002 at 05:50:21PM +0200, DEVRIENDT ERIK wrote:
> Hi,
> 
> I am porting a client-server set of programs that run
> fine under linux.
> The programs communicate using UNIX domain datagram sockets.
> the server does the classic socket(), unlink(), bind() and then a loop
> with read(). There is no accept() because we use datagram
> sockets.
> 
> The problem is in the client, which does socket(), connect()
> and then a loop with write() calls.
> The connect() hangs for 10 seconds and then fails with errno=111
> (Connection refused).
> When using sendto() I manage to send data, but that doesn't fit well
> in the current implementation of the client (we use the same
> codebase for several platforms). 
> According to the man pages of select() on linux and HP-UX it is allowed
> to use connect() with datagram sockets; it sets the default destination
> address for the communication over that socket.
> 
> Is this a cygwin bug, or am I doing something wrong ?

Could you please test if it works when omitting the unlink()
on the server side?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]