Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Simple Socket client/server c++

Options
  • 11-12-2002 4:49pm
    #1
    Registered Users Posts: 6,240 ✭✭✭


    Hi
    Its been a while since I have even looked at cpp, - curse you PowerBasic -

    has anyone got an extremly simple echo client/server (TCP) prog out there??

    I'm just looking for something to send say hello world
    and the server would send it back

    windows btw

    preferably not classes


Comments

  • Registered Users Posts: 23,212 ✭✭✭✭Tom Dunne


    Oops - ignore that.


  • Closed Accounts Posts: 6,601 ✭✭✭Kali


    Best bet is to do a search for winsock.h and its socket functions... theres probably a few hundred hello world examples out there :)

    Personally I haven't looked at it since college but afair as soon as you setup winsock and initialize the socket (which isnt terribley tasking), its basically a case of using send() & recv() functions on the client side and bind() and accept() on the server side.


  • Registered Users Posts: 2,593 ✭✭✭tommycahir


    http://www.inf.pucrs.br/~derose/files/winsocktutorial.html

    hope that this tutorial will help you with your prob :D


Advertisement