These two programs (6.1. A Simple Stream Server, 6.2. A Simple Stream Client) don't compile under win xp by using Dev-C++ environment: http://beej.us/guide/bgnet/output/ht...entserver.html
Is it normal? I cannot test it under Unix at the moment.
These two programs (6.1. A Simple Stream Server, 6.2. A Simple Stream Client) don't compile under win xp by using Dev-C++ environment: http://beej.us/guide/bgnet/output/ht...entserver.html
Is it normal? I cannot test it under Unix at the moment.
Correct, that code uses a range of Unix system calls. It would not be trivial to rewrite it to Windows without some understanding of Unix and Windows functionality. With
Actually, the client code doesn't seem very difficult to compile on Windows - maybe a few include files that need to be changed, but other than that, it should be pretty straight forward.
The server uses fork, which would have to be replaced by a thread - using beginthreadex would be the best option, I think, and the sigchild_handler can probably be completely removed.
[I haven't actually looked CAREFULLY at the code - just a quick glance - I may be wrong]
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.