Hi all,
I tried very simple program on native Plan9:
#include u.h
#include libc.h
void
main(int, char**)
{
int afd, lfd;
char adir[NETPATHLEN], ldir[NETPATHLEN];
afd = announce(tcp!*!20540, adir);
if (afd 0)
sysfatal(listen: %r);
lfd = listen(adir, ldir);
if (lfd 0)
sysfatal(listen: %r);
On 10 October 2014 08:48, Pavel Klinkovský pavel.klinkov...@gmail.com
wrote:
Do you have any explanation?
Did I make some bug in the program?
Not all network types implement reject, and the result of reject is
therefore usually ignored (since in any case the connection is going to be
closed).
On 10 October 2014 10:22, Charles Forsyth charles.fors...@gmail.com wrote:
Not all network types implement reject,
To be more precise: not all network types allow a diagnostic to be sent
with the reset or close and sadly TCP/IP is one of them.
Hi Pavel !
It seems, you do it incorrectly :) dial(2) has an exact example if using
announce/listen/accept functions.
2014-10-10 11:48 GMT+04:00 Pavel Klinkovský pavel.klinkov...@gmail.com:
Hi all,
I tried very simple program on native Plan9:
#include u.h
#include libc.h
void
main(int,
Hi Sergey,
It seems, you do it incorrectly :) dial(2) has an exact example if using
announce/listen/accept functions.
I do exactly what I need. ;)
The sequence announce/listen/accept is very well known to me.
But I need both possibilities:
- accept incoming connection
- reject incoming
On 10 October 2014 10:28, Pavel Klinkovský pavel.klinkov...@gmail.com
wrote:
reject incoming connection, which failed.
reject should probably swallow the error return from the ctl file write, as
accept does, until
tcp/ip and others interpret the control request and either reset the
connection