Read and write incoming udp packets???

  • Thread starter Thread starter roberto
  • Start date Start date
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
 
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.
 
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?
 
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,
 
Back
Top