-3

I need to create a user interface to control a tool that is connected directly to my computer via an Ethernet cable. The controller is listening at a specified socket for connection requests.

When the connection is made the controller will broadcast streams of data.

I am currently looking to use client code similar to this example (https://msdn.microsoft.com/en-us/library/bbx2eya8(v=vs.110).aspx)

If I knew the IP address and the port number, would i be able to accomplish this connection? I'm new to socket programming so I'm not sure if this a good way to go about it.

Taegost
  • 1,208
  • 1
  • 17
  • 26
  • Does the "tool" already exist, or are you creating that as well? – Taegost Jan 13 '16 at 18:37
  • it exist's, i just need to connect to its controller. So i decided to use a windows form application running on my computer as the user interface to pull values that i need from the controller. – Julio Sanchez Jan 13 '16 at 18:49
  • Is there documentation with the controller about the best way to create an interface for it? Is there an API? – Taegost Jan 13 '16 at 19:27

1 Answers1

0

If this controller is listening for socket connections and the application doesn't listen for incoming connection requests you only need a TcpClient object to start the communication.

Here is a basic sample.

juliano.net
  • 7,982
  • 13
  • 70
  • 164