VB.NET-INFORMATIONS.COM



VB.NET Communications Tutorial

VB.NET MultiThreaded Socket Programming

VB.NET MultiThreaded Socket Programming

Multithreaded Socket Programming means that a Multithreaded Server can communicate with more than one clients at the same time . In the previous section Socket Programming , the Server Socket Program can communicate with only one client at a time . That means it s not possible to connect another Client Socket Program at the same time to communicate with Server . From the following figure you can understand how to a Server can communicate with more than one client at the same time .You can see the basics of Socket Programming in the previous section , take a look at Socket Programming before you start this section.

vb.net_multithreaded_socket_programming_1.JPG

The basic idea behind Multithreaded Socket Programming is, whenever Server gets a connection request from Client , the Server create a separate ( independent ) Thread for the each Client request. That means for each Client, there is a separate Client Thread in Server . So the Client can communicate independently with their own Client Thread in Server.

vb.net_multithreaded_socket_programming.JPG

In the following sections you can see in detail of How a Multithreaded Socket Programming can communicate with more than one client at the same time.

The Multithreaded Socket Programming has two sections.

1. Multithreaded Server Socket Program

2. Multithreaded Client Socket Program

How to run this program ?

Create Multithreaded Server Socket Program and Multithreaded Client Socket Program and run the Server program first . Then you will get message of "Server started" . Next you start the Client program , then you can see the message from Server . You can start more than one client same time and communicate with Server . For each client Server responds with the Clients Connection ID Number.


VB.NET Communications Related Contents
How to send email from VB.NET
VB.NET Send email using CDOSYS
How to find IP Address of Host
How to read a URL Content
VB.NET Socket Programming
VB.NET Server Socket Program
VB.NET Client Socket Program
VB.NET MultiThreaded Server Socket Programming
VB.NET MultiThreaded Client Socket Programming
VB.NET Chat Server Program
VB.NET Chat Server
VB.NET Chat Client

VB.NET Related Tpoics
Microsoft .Net Framework Tutorials
VB.NET Language Basics Tutorials
VB.NET Program Flow Control Tutorials
VB.NET Collections Tutorials
VB.NET String Tutorials
VB.NET Files Tutorials
VB.NET Excel 2007 Tutorials
VB.NET Crystal Reports Tutorials
VB.NET Communications Tutorial
VB.NET ADO.NET Tutorial with source code
ADO.NET Data Providers help and Tutorial
VB.NET ADO.NET Dataset Tutorial
ADO.NET DataAdapter and Dataset
VB.NET ADO.NET DataView Tutorial

Search here for more Vb.Net Source Code :


   Categories

    HOME
    VB.NET

 
 
 
   













  |  Home   |  SiteMap   |  About   |
net-informations.com (C) 2008 All Rights Reserved