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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Simple Socket client/server c++

  • 11-12-2002 3:49pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 2,591 ✭✭✭tommycahir


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

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


Advertisement