Application #80. Use Sockets

This sample application demonstrates how to create a simple chat program by using sockets. Support for using sockets within Visual Basic .NET is provided by the System.Net and System.Net.Sockets namespaces. Broken into two different solutions, the sample application features a chat server (shown in Figure 9-2) and a chat client. It demonstrates three important aspects of sockets communication using the TcpClient and TcpListener classes:

  • Server-to-client communication The server application allows you to enter text to broadcast to all attached clients. To run this demonstration, run the server and at least one instance of the client.

  • Client-to-client communication This shows how to send text from a client application ...

Get 101 Microsoft® Visual Basic® .NET Applications now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.