473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

thread handling in .NET

dear all

I need to create a module which will handle a TCP comunication. In that module i need to create a thread which will only taking care of polling an open listen port for incoming data. As soon as data arrived the thread should send an event to the main application

does any one have experience on that or can guide me how to start

thanks for your hel
regard
serge
Jul 21 '05 #1
3 1570
Look here, enough thread examples to get you started

http://www.c-sharpcorner.com/Multithreading.asp

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Serge calderara" <an*******@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com...
dear all,

I need to create a module which will handle a TCP comunication. In that module i need to create a thread which will only taking care of polling an
open listen port for incoming data. As soon as data arrived the thread
should send an event to the main application.
does any one have experience on that or can guide me how to start?

thanks for your help
regards
serge

Jul 21 '05 #2
Cor
Hi Serge,

VB or C#

Because in this VB resource kit are on both of your questions answers
(But if not, there is only a very slight difference between C# and VB.net)

VB has more commands (functions/methods), but VB has for a lot of things 2
commands and then there is almost always an equivalent that is also in C#.

http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

And if you have problems installing it

http://msdn.microsoft.com/vbasic/vbr...q/#installvdir

I hope this helps a little bit?

Cor

Cor
I need to create a module which will handle a TCP comunication. In that module i need to create a thread which will only taking care of polling an
open listen port for incoming data. As soon as data arrived the thread
should send an event to the main application.
does any one have experience on that or can guide me how to start?

Jul 21 '05 #3
=?Utf-8?B?U2VyZ2UgY2FsZGVyYXJh?= <an*******@discussions.microsoft.com>
wrote in news:DF**********************************@microsof t.com:
I need to create a module which will handle a TCP comunication. In that
module i need to create a thread which will only taking care of polling
an open listen port for incoming data. As soon as data arrived the
thread should send an event to the main application.


http://www.indyproject.org/indy.html

Indy - its Open source and free.

TIdTCPServer does exactly this for you.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Goerzen | last post by:
Hello, I am the author of OfflineIMAP, a program that currently is a heavy user of threads. For various reasons (see below), thread groups are something that is highly desirable for me in...
31
by: AlexeiOst | last post by:
Everywhere in documentation there are recommendations to use threads from thread pooling for relatively short tasks. As I understand, fetching a page or multiple pages (sometimes up to 50 but not...
6
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something...
7
by: Droopy | last post by:
Hi, I don't understand why sometimes, a loop running in a thread takes much more time than usual. I have a thread that must call each 20 ms a C++ unmanaged function. I made a C++ managed...
16
by: droopytoon | last post by:
Hi, I start a new thread (previous one was "thread timing") because I have isolated my problem. It has nothing to do with calling unmanaged C++ code (I removed it in a test application). I...
18
by: Urs Vogel | last post by:
Hi I wrote an application server (a remoting sinlgeton), where processes must be stopped in very rare cases, done thru a Thread.Abort(). Occasionally, and only after a Thread.Abort(), this...
0
by: Sir Spamallot | last post by:
Hi there, Previously when handling the termination of threads I had just called the abort method and caught it in a try catch block in the thread callback. After recently learning that this was...
27
by: Ritesh Raj Sarraf | last post by:
Hi, I have some basic doubts about thread. I have a list which has items in it which need to be downloaded from the internet. Let's say list is: list_items which has 100 items in it.
3
by: Bob | last post by:
Hi, I have an app that has a 3rd party phone answering control (4 of ) (interfacing with dialogic 4 line card) attached to the main form. each control raises an event when its Dialogic line...
25
by: JC | last post by:
Hi People, Please I need your help. This code run a thread ok but Not close later. thanks... private void RunServer(int aPortNumber) {
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.