Equivalent of VB6 Winsock control in C#

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
 
E

Etienne Boucher

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

Etienne Boucher
 

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

Similar Threads


Top