Results 1 to 2 of 2

Thread: Mutli-Threading/Sockets Chat Help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Posts
    198

    Mutli-Threading/Sockets Chat Help

    How do I make a chat room that multi clients will be connecting to at once. Im trying to add a ping/pong method which is just msgbox that tells the user if the message was received. I know that you need a background worker for this but how do i handle all the msgs that are going back and forth to all the clients that are connected to the server.



    Thanks a million!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Mutli-Threading/Sockets Chat Help

    You would use the TcpListener and TcpClient classes. There are plenty of examples of their use around so a search will turn them up. The TcpListener explicitly supports asynchronous connections so there's no specific need to use a BackgroundWorker.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width