Click here to Skip to main content
14,207,783 members
Rate this:
 
Please Sign up or sign in to vote.
Currently I'm building a project where I can send Massage to specific connected clients. But when ever I send data it goes to all of the connected client.I've reviewed this code but still confuse how to implement the solution :( .
Server Code
While True
           Dim incoming As TcpClient = Me.MyTcpListener.AcceptTcpClient
           Dim Str As StreamReader = New StreamReader(incoming.GetStream)
          Dim C As New Client
               C.ClientID = Me.ClientID
               C.Str = Str
               C.Start(IncomingConnection)
               Me.ClientList.Add(C)
               RaiseEvent _ClientConnected(C)
               AddHandler C._ClientDisconnect, AddressOf ClientDisconnected
               Me.ClientID += 1
               End While

Note : I found this code a long time ago and i only have it now. The main goal I want to achieve here is to communicate from server to specific client using client_ID.

What I have tried:

Sample of my code..:
Dim server as TCPListener
server.start(9090)
while true
listbox1.Items.Add(server.RemoteEndPoint.Address.toString)
end while 
Posted
Updated 24-Oct-16 20:11pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.190612.1 | Last Updated 25 Oct 2016
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100