Thread: Need some help w/ my instant messenger

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    241

    Need some help w/ my instant messenger

    Well I remember writing one a long time ago but I forgot how I looped to wait for a connection.... any ideas on how to do it?

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,794
    Open listening socket and assign a callback that will be called when incoming connection arrives?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

  3. #3
    Registered User
    Join Date
    Mar 2005
    Location
    Juneda
    Posts
    291
    Under Windows and using winsocks you can use a new thread and pass to it a 'copy' of the socket accepted; then on that new thread just call and recall the receive/send functions till you get the close instruction.

    Hope that helps.

    Niara

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Instant Messenger
    By Mahi~Mahi in forum C++ Programming
    Replies: 3
    Last Post: 05-10-2008, 03:02 PM
  2. Instant Messenger for DOS
    By nitinol in forum C Programming
    Replies: 2
    Last Post: 12-21-2005, 10:17 PM
  3. IRC/Flood.c virus from instant messenger
    By lschmidt in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 09-27-2005, 03:41 PM
  4. Instant messenger app help
    By AusTex in forum C Programming
    Replies: 2
    Last Post: 05-01-2005, 12:41 AM
  5. Editing Instant Messenger (please help!)
    By Leeman_s in forum C++ Programming
    Replies: 6
    Last Post: 10-09-2001, 02:23 AM