Thread: Threads in C++

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    3

    Arrow Threads in C++

    Hey...
    Okay here's the deal. I'm thinking of creating an IRC client, but the thing is.. i don't know what to use or how to make it so that it's waiting for incoming messages from the server AND sending whatever i type in at the same time. Any input is appreciated.. thanks

    Regards
    rezonax


    ---
    CodePeople <-- if($needhelpwith=="programming") visit(codepeople);

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    15
    This is somewhat an involved process. You will need code on the server side as well as on the client side. You will first need to establish a connection to the server via sockets. Once that is done, you will need to pass the server a pointer or handle to your thread's message queue. After that is accomplish, the server will be able to post messages to your thread's message queue. Once the message is in your queue (the client side), you will then be able to process the messages from the server using your message loop.

    This should start you off in the right direction. You should look at the msdn library for sockets, threads, and message queues. You should be able to start writing code from there. I hope this helps. If you need any more information let me know. Good Luck!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 10-17-2008, 11:28 AM
  2. Yet another n00b in pthreads ...
    By dimis in forum C++ Programming
    Replies: 14
    Last Post: 04-07-2008, 12:43 AM
  3. Classes and Threads
    By Halloko in forum Windows Programming
    Replies: 9
    Last Post: 10-23-2005, 05:27 AM
  4. problem with win32 threads
    By pdmarshall in forum C++ Programming
    Replies: 6
    Last Post: 07-29-2004, 02:39 PM
  5. Block and wake up certain threads
    By Spark in forum C Programming
    Replies: 9
    Last Post: 06-01-2002, 03:39 AM