Home arrow Visual Basic arrow Page 6 - Two Person Chat With The Winsock Control And Visual Basic
VISUAL BASIC

Two Person Chat With The Winsock Control And Visual Basic


The Microsoft WinSock library allows you to connect to a remote machine and exchange data using either the User Datagram Protocol (UDP) or the Transmission Control Protocol (TCP). Both protocols can be used to create client-server applications. In this tutorial Jason will be teaching you how to create a direct-connect chat program that uses TCP. The program itself will be designed in such a way that it can act as both the client and server.

Author Info:
By: Jason Brimblecombe
Rating: 5 stars5 stars5 stars5 stars5 stars / 320
January 12, 2002
TABLE OF CONTENTS:
  1. · Two Person Chat With The Winsock Control And Visual Basic
  2. · Creating the chat form
  3. · Code from the clients point of view
  4. · Code from the clients point of view (contd.)
  5. · Code from the servers point of view
  6. · Using our chat application
  7. · Conclusion

print this article
SEARCH DEVARTICLES

Two Person Chat With The Winsock Control And Visual Basic - Using our chat application
(Page 6 of 7 )

To use our chat application, simply download the support material from the last page of this article. Install the compiled version of the chat application on both yours and another friend's computers. If you don't have access to a friendís computer, then you can just install it on your computer for now.

Run the chat application from the start menu: Start -> Programs -> devChat -> devChat. If youíre acting as the client, then enter the IP address of the remote computer into the IP text box, enter you alias, and then click the connect button.

If you're acting as the server, enter your alias and click on the listen button. Once Winsock has completed its connection loop on the client's machine, then you're ready to chat. Click the close button to terminate the current chatting session.

NB: If you only have access to one computer, then that's fine. Start two instances of the program. Click on the listen button in one instance. Switch to the other, enter "127.0.0.1" for the IP address, and click connect. The connect will be established and you can chat away!
blog comments powered by Disqus
VISUAL BASIC ARTICLES

- Developing an XML Web Service Using Visual S...
- Creating an HTML File List with VB
- Fun with Email: VB6, CDO, MAPI, and a Remote...
- Extranet/Intranet Dictionary Cracker in VB
- Finding Default App Icons With Visual Basic
- Registry Fever With Visual Basic
- Implementing An ADO Data Control With VB6
- Printing With Visual Basic
- MSMQ Part 1/2: Architecture and Simple Imple...
- Magnifying The Desktop With Visual Basic
- Sending Email With MAPI Components in Visual...
- Two Person Chat With The Winsock Control And...
- A Real-Time ActiveX News Control
- Accessing the Windows API in Visual Basic

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials