.Net equivalent app of VB6 app using Winsock control

  • Thread starter Thread starter MikeL
  • Start date Start date
M

MikeL

Hello.

I want to rewrite a VB6 app that uses the Winsock control to communitate to
an IBM AS/400 computer via TCP/IP, and possibly later on via UDP.

What .Net namespaces/classes/etc.would I need to look at to get this thing
going? Also, what pitfalls (if any) should I look out for?

Thanks in advance,

Mike
 
MikeL said:
Hello.

I want to rewrite a VB6 app that uses the Winsock control to communitate
to an IBM AS/400 computer via TCP/IP, and possibly later on via UDP.

What .Net namespaces/classes/etc.would I need to look at to get this thing
going? Also, what pitfalls (if any) should I look out for?

Have a look at the System.Net namespaces. In particular the Socket class,
TcpClient and TcpListener. TcpClient and TcpListener provide a higher-level
interface than Socket. For UDP, you can use UdpClient. TcpListener listens
for connections and returns a TcpClient when a connection is created.
 
Back
Top