Read and write incoming udp packets???

R

roberto

Hi,i'm trying to read udp packets sent by satellite.
It's a porting of a delphi program i did some year ago but , as i'm
learning c#, i'd like to do it.
I have the ip address of the sat card(238.238.200.200), ip address an
port where data are coming from( 139.139.139.139:9000).
Using socket class i have to read the datagrams and show them in a
textbox or something after parsing .
Old prog read the datagram as a stream, but in c# i'm confused.I read
all msdnon sockets but.......
Please could anyone point me with some code on how to set up the
socket listening, reading?

Thanks.robert0
 
M

Mike Swaim

roberto said:
Hi,i'm trying to read udp packets sent by satellite.
It's a porting of a delphi program i did some year ago but , as i'm
learning c#, i'd like to do it.

You could use Indy, of course. They have a .net version of their
library.
 
R

roberto

Mike Swaim said:
roberto wrote:
You could use Indy, of course. They have a .net version of their
library.


Oh, thanks but it's not easy for me as they are blocking connection
and i think must be in a thread..
Isn't any way to have some code using sockets?
 
J

Joerg Jooss

roberto said:
Oh, thanks but it's not easy for me as they are blocking connection
and i think must be in a thread..
Isn't any way to have some code using sockets?

Sure, why not? The .NET FCL fully supports UDP. To get you started, you can
have a look at the helper class System.Net.UdpClient.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top