Client and server, windows xp

This is a discussion on Client and server, windows xp within the C Programming forums, part of the General Programming Boards category; These two programs (6.1. A Simple Stream Server, 6.2. A Simple Stream Client) don't compile under win xp by using ...

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    19

    Client and server, windows xp

    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.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. client server programming using C on windows environment
    By ragsnayak in forum Networking/Device Communication
    Replies: 3
    Last Post: 11-15-2008, 08:50 AM
  2. server client application - (i really need your help)
    By sarahnetworking in forum C Programming
    Replies: 3
    Last Post: 03-01-2008, 09:54 PM
  3. Client works on a LAN but don't send all the data
    By Niara in forum Networking/Device Communication
    Replies: 9
    Last Post: 01-04-2007, 03:44 PM
  4. Where's the EPIPE signal?
    By marc.andrysco in forum Networking/Device Communication
    Replies: 0
    Last Post: 12-23-2006, 07:04 PM
  5. Unicode vurses Non Unicode client server application with winsock2 query?
    By dp_76 in forum Networking/Device Communication
    Replies: 0
    Last Post: 05-16-2005, 07:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21