here is what i have so far (i left some parts out as they don't have anything to do with Clients connecting)
Expand|Select|Wrap|Line Numbers
- static void Main()
- {
- static TcpListener ServerSocket = new TcpListener(16487);
- static TcpClient clientSocket = default(TcpClient);
- while (true)
- {
- if (blnAllowConnect == true)
- {
- ClientCounter += 1;
- clientSocket = ServerSocket.AcceptTcpClient();
- Console.WriteLine("Client :" + Convert.ToString(ClientCounter) + " has started!");
- handleClinet client = new handleClinet();
- client.startClient(clientSocket);
- }
- }
- }
- public class handleClinet
- {
- TcpClient clientSocket;
- string clNo;
- public void startClient(TcpClient inClientSocket)
- {
- this.clientSocket = inClientSocket;
- Thread WorkThread = new Thread(TransferData);
- WorkThread.Start();
- }
- private void TransferData()
- {
- //Here is where I'm getting stuck,
- //I've tried a few different things
- //but none have quite worked out
- }
- }
with something like 55 in it and waits for data back.
the idea is that the data it gets back is only from Clients 10 numbers above or below 55.
thank you for all the help I've been stuck trying different methods over the past couple days.