sending an empty UDP packet.

2006-06-30 Thread Tanaka Akira
ygwin ruby can receive empty UDP packet.) $ ~/19/bin/ruby -rsocket -ve 'UDPSocket.new.send("", 0, "127.0.0.1", )' ruby 1.9.0 (2005-07-22) [i386-mswin32] But I cannot send an empty UDP packet. $ ~/ruby/bin/ruby -rsocket -ve 'UDPSocket.new.send(&qu

bind(sock, addr, addrlen) doesn't respect addrelen

2013-02-03 Thread Tanaka Akira
;d'; addr.sun_path[4] = '\0'; ret = bind(s, (struct sockaddr *)&addr, addrlen); if (s == -1) { perror("bind"); exit(EXIT_FAILURE); } return EXIT_SUCCESS; } -- Tanaka Akira -- Problem reports: http://cygwin.com/problems.html FAQ: http://

non-blocking accept() can hang.

2013-02-04 Thread Tanaka Akira
OCK_STREAM, 0); if (c == -1) { perror("socket(client)"); exit(EXIT_FAILURE); } ret = connect(c, (struct sockaddr *)&addr, addrlen); if (ret == -1 && errno == EINPROGRESS) { perror("connect"); } else if (ret == -1) { perror("connect");

Re: non-blocking accept() can hang.

2013-02-05 Thread Tanaka Akira
2013/2/5 Achim Gratz : > Tanaka Akira fsij.org> writes: >> I found that non-blocking accept() can hang. > [...] > > Have you tried this with the latest snapshot already? > I think I use a released version, not a snapshot. (I updated Cygwin several days ago.) I attach

Re: non-blocking accept() can hang.

2013-02-07 Thread Tanaka Akira
2013/2/6 Achim Gratz : > It was clear from your post that you were running the release version, thank > you. I've compiled your program and it does seem to work correctly, I'm > running > the latest snapshot. Thank you. I'm grad to hear that. I can wait nex

Re: non-blocking accept() can hang.

2013-02-11 Thread Tanaka Akira
rror("accept"); exit(EXIT_FAILURE); } return EXIT_SUCCESS; } % gcc -Wall tst-nonblocking.c -o tst-nonblocking % ./tst-nonblocking connect: Operation now in progress (^C is effective) zsh: interrupt ./tst-nonblocking -- Tanaka Akira cygcheck.out Description: Binary data -- Problem repo

Re: non-blocking accept() can hang.

2013-02-19 Thread Tanaka Akira
gt; from the connecting side. Thank you for the information. I'll use threads. -- Tanaka Akira -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

Unix domain accept() and getperrname() doesn't return the client address.

2013-03-03 Thread Tanaka Akira
ror("connect"); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } % gcc -Wall tst-server.c -o tst-server % gcc -Wall tst-client.c -o tst-client % (./tst-server & sleep 1; ./tst-client; wait) accept socklen: 2 accept pathlen: 0 accept sun_path: [] getpeername socklen: 2 getpeername pathle

Re: Unix domain accept() and getperrname() doesn't return the client address.

2013-03-07 Thread Tanaka Akira
xit(EXIT_FAILURE); } ret = bind(c, (struct sockaddr *)&caddr, sizeof(caddr)); if (ret == -1) { perror("bind"); exit(EXIT_FAILURE); } ssize = sendto(c, "msg", 3, 0, (struct sockaddr *)&saddr, sizeof(saddr)); if (ssize == -1) { perror("sendto"); exit(EXIT_F

Re: Unix domain accept() and getperrname() doesn't return the client address.

2013-03-07 Thread Tanaka Akira
path. If a Unix domain datagram server don't get an address of client, the server cannot send a reply. I think this means Unix domain datagram socket will be much less useful. -- Tanaka Akira -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin

Re: Socket bug in 20130301 snapshot

2013-03-07 Thread Tanaka Akira
gt; "/var/run/dbus/system_bus_socket": File name too long I guess this is result of http://cygwin.com/ml/cygwin/2013-02/msg00018.html : "It also tests that the filename is always NUL-terminated" -- Tanaka Akira -- Problem reports: http://cygwin.com/problems.html FAQ: