Skip to content

Problem with TCP server

chaitu chaitu

Asked Sep 10, 2010, 8:56 AM EDT2 answers
Share
LinkedInX
0

Hello Guys,

I am new to this forum and this is my first post. Please help!!!

Here is my scenario.

I am creating a tcp listener which will be listening for multiple clients. Once it gets the connection from any client(s) listener will send query to it and after getting response back it will store into the database. the client(s) will always remain connected so my listeners job will be to wait for specific time(each client may have different timer interval. some may have in minutes and some may have in hours) and resend query back to client(s). How can I achieve this using threading?

Please let me know.

Thanks in advance,

Chaitu18

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    use the async calls to manage them properly. Async calls which start like BeginXXXX / EndXXXX..
    or create ur own delegates to get the job done..and call .BeginInvoke / EndInvoke to handle them properly.
    rather creating many background threads, try using threadpool threads, where above will create thread pool threads.
     
    0