Equivalent of VB6 Winsock control in C#

  • Thread starter Thread starter Mike P
  • Start date Start date
M

Mike P

What is the equivalent of the VB6 Winsock control in C#? I'm looking at
converting some code from VB6 to C# (see below). Does anybody know how
I would do this?

tcpSendData.RemoteHost = "10.0.4.2" 'test
tcpSendData.RemotePort = 1024 'Set port

'Invoke the Connect method to initiate connection
tcpSendData.Connect


Any assistance would be really appreciated.


Cheers,

Mike
 
You can use the TcpClient class, if you need anything else network related,
check the System.Net and System.Net.Sockets namespaces.

Etienne Boucher
 
Back
Top