Thread: So this is the code for the client and server

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,666
    And still there were no error messages....
    If you can't compile it, paste your compiler error message(s)
    If you can't run it, paste your run-time error(s)

    Lemme guess, your firewall is blocking access between your client and server?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #2
    Hail Linus Torvalds
    Join Date
    Sep 2004
    Posts
    14
    No there are no compilation errorS when I run this code.Obviously because I took it off a text book. I need step by step instructions to run this code on MS.NET 2003.And for such code there are some dependencies to be set on VisualStudio . I needto know whatthey are.

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Obviously because I took it off a text book.
    Oh, if only we could trust all code from text books. The harsh reality is that all books (with a handful of exceptions) present erroneous code. Most of those books do so regularly and embarrassingly to an experienced reader.

    >No there are no compilation errorS when I run this code.
    >to run this code on MS.NET 2003
    That's funny. When I compile your code in Visual C++ .NET 2003, I get errors with the non-standard header iostream.h. Are you sure that there are no errors?
    My best code is written with the delete key.

  4. #4
    Hail Linus Torvalds
    Join Date
    Sep 2004
    Posts
    14
    Try to open this code in a project and then run it .I had the same error initially but got over it. it should actually say Build Succeeded. It's the project that actually an executable. As far as the code is concerned, I do agree that text books have erroneous code, but this is from Andrew Tanenbaum's Distributed OS.And I think Andrew makes sure the code works ok

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >And I think Andrew makes sure the code works ok
    And I'm sure it did...in 1995.

    >Try to open this code in a project and then run it
    Oddly enough, I get a compiler error.

    But once the code is fixed to compile and wsock32.lib is added to the library list, the programs work properly. I would wager that you either aren't seeing the errors, have done something wacky that allows you to compile invalid code and that causes odd run-time behavior, or you forgot to include the library.
    My best code is written with the delete key.

  6. #6
    Hail Linus Torvalds
    Join Date
    Sep 2004
    Posts
    14
    Now how do I add the wsock32.lib file to it.Could you tell me how. Are you running it in a winsock32 console application.I see you've got past the <iostream> error. Do you get a console screen requesting the server for information.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. server client application - (i really need your help)
    By sarahnetworking in forum C Programming
    Replies: 3
    Last Post: 03-01-2008, 10:54 PM
  2. c program client server
    By steve1_rm in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-24-2008, 10:33 AM
  3. Need winsock select() client & server source code or tutorial
    By draggy in forum Networking/Device Communication
    Replies: 2
    Last Post: 06-19-2006, 11:49 AM
  4. 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
  5. [SOCKETS] Solaris server in C, NT client in VB
    By Daveg27 in forum C Programming
    Replies: 3
    Last Post: 05-23-2002, 10:02 AM