Sockets programming -- Connection refused
Nikos Mavroyanopoulos
nmav at hellug.gr
Sun Aug 6 23:22:56 EEST 2000
On Sat, Aug 05, 2000 at 08:25:09PM +0300, Alexandros Andreou wrote:
> Ti 3exasa, ti 3exasa... To attached arxeio :-)
[...]
> if (argc == 3)
> port = (unsigned short int)strtol(argv[2], NULL, 10);
Edw thelei: port=htons(...);
Orismena stoixeia twn dieuthinsewn kathorizontai se network byte order
(big-endian).
> if ((fp = fdopen((int)stdin, "r")) == NULL) {
> perror("sysmgr.c: fdopen(stdin)");
> exit(ERROR);
> }
Edw ti akrivws kaneis? Auto pou theleis kaneis den prokeitai na doulepsei
etsi. To stdin exei anoixto file perigrafea, kai legetai stdin!
< while (fgets(buf, BUFSIZE, fd) != NULL) {
> while (fgets(buf, BUFSIZE, stdin) != NULL) {
--
Nikos Mavroyanopoulos
--
linux-greek-users mailing list -- http://lists.hellug.gr
More information about the Linux-greek-users
mailing list