|
-
Jan 13th, 2010, 09:13 AM
#1
Thread Starter
Lively Member
Server connecting to multiple clients async
Hi,
I am pretty new to C#.net, from a vb6 background. I am needing to write a windows service that will, when started, start trying to connect to many clients using TCPIP on different ip's and port numbers. I think I'm pretty ok with the service side of things, but am wondering the best way to connect to the remote clients, would I use threading?
Many thinks
c#.net version will be the latest there is no restriction on which version I use
Last edited by reado; Jan 13th, 2010 at 10:47 AM.
-
Jan 13th, 2010, 08:41 PM
#2
Re: Server connecting to multiple clients async
The TcpListener and TcpClient classes support asynchronous methods, so there's no need to implement multi-threading explicitly. Follow the VB CodeBank link in my signature and check out the Asynchronous Client/Server submission. The code is in VB but the principles are all the same, so you can see which methods to call and how to call them. If you need further help then feel free to ask more specific questions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|