Socket programming for beginners

Discussion in 'C Programming' started by ballpointpenthief, Jan 5, 2006.

  1. Is this group the correct place to ask this question?

    Since no-one has answered me as yet I will post it here anyway.
    = = = = == = ==== = = =====

    I'm trying to program sockets in C, very trivial usage.

    Using lcc-win32:
    I get some compilation error about #include being to deeply nested.

    Using dev-c++:
    I get linker errors for some commands.

    I suspect that my lack of knowledge as to what header files and what to
    put in the linker is the cause of my grief.
    The code is straightforward. {socket(), connect(), and suchlike for
    client} & {socket(), bind(), listen(), accept() and suchlike for
    server} that I found on two tutorials.

    Where to go? I've wasted quite a lot of time.

    Thanks, Matt
     
    ballpointpenthief, Jan 5, 2006
    #1
    1. Advertising

  2. ballpointpenthief

    Eric Sosman Guest

    ballpointpenthief wrote:

    > Is this group the correct place to ask this question?


    No; C has no built-in networking facilities. Since it
    appears you're using Windows, try a Windows forum. Or,
    since you seem to be using the POSIX bindings, try a POSIX
    or Unix forum.

    > Since no-one has answered me as yet I will post it here anyway.
    > = = = = == = ==== = = =====
    >
    > I'm trying to program sockets in C, very trivial usage.
    >
    > Using lcc-win32:
    > I get some compilation error about #include being to deeply nested.
    >
    > Using dev-c++:
    > I get linker errors for some commands.


    When you find an appropriate forum, you might take time
    to elaborate on "some compilation error" and "linker errors."
    All anyone can do with the information provided is guess that
    you have made "some" mistakes "somewhere."

    > I suspect that my lack of knowledge as to what header files and what to
    > put in the linker is the cause of my grief.
    > The code is straightforward. {socket(), connect(), and suchlike for
    > client} & {socket(), bind(), listen(), accept() and suchlike for
    > server} that I found on two tutorials.
    >
    > Where to go? I've wasted quite a lot of time.


    You'll waste more if you don't learn to make a better
    problem report. "Doctor, it hurts!" "Where does it hurt?"
    "In my body." "Take two aspirin and call me in the morning."

    Good luck -- and remember: Very few of the people who may
    want to help you happen to be mind-readers.

    --
    Eric Sosman
    lid
     
    Eric Sosman, Jan 5, 2006
    #2
    1. Advertising

  3. ballpointpenthief

    jacob navia Guest

    ballpointpenthief a écrit :
    > Is this group the correct place to ask this question?
    >
    > Since no-one has answered me as yet I will post it here anyway.
    > = = = = == = ==== = = =====
    >
    > I'm trying to program sockets in C, very trivial usage.
    >
    > Using lcc-win32:
    > I get some compilation error about #include being to deeply nested.
    >
    > Using dev-c++:
    > I get linker errors for some commands.
    >
    > I suspect that my lack of knowledge as to what header files and what to
    > put in the linker is the cause of my grief.
    > The code is straightforward. {socket(), connect(), and suchlike for
    > client} & {socket(), bind(), listen(), accept() and suchlike for
    > server} that I found on two tutorials.
    >
    > Where to go? I've wasted quite a lot of time.
    >
    > Thanks, Matt
    >

    Hi

    The first thing to do is read the documentation... isn't it?

    Download from the lcc-win32 site:
    http://www.q-software-solutions.de/pub/tutorial.pdf
    and read the Network Programming part, beginning with
    section 4.7: Client/Server programming using sockets.

    When you understand that, you can go further. Since lcc-win32
    is not on topic here (this group is about the C language)
    pose any further questions in the newsgroup
    comp.compilers.lcc

    jacob
     
    jacob navia, Jan 5, 2006
    #3
  4. "ballpointpenthief" <> writes:
    > Is this group the correct place to ask this question?
    >
    > Since no-one has answered me as yet I will post it here anyway.
    > = = = = == = ==== = = =====
    >
    > I'm trying to program sockets in C, very trivial usage.


    You posted the same question twice, about 2 minutes apart. If this
    was deliberate, it's a bad idea; if it wasn't, figuring out and
    avoiding whatever you did to do this is a good idea.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Jan 5, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laszlo Nagy
    Replies:
    1
    Views:
    4,942
    Mark Wooding
    Jan 27, 2009
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    996
    Jean-Paul Calderone
    Jan 27, 2009
  3. Laszlo Nagy
    Replies:
    0
    Views:
    571
    Laszlo Nagy
    Feb 1, 2009
  4. Steve Holden
    Replies:
    0
    Views:
    687
    Steve Holden
    Feb 1, 2009
  5. Steve Holden
    Replies:
    1
    Views:
    734
Loading...

Share This Page