Problem establishing connection to a server built using VB Winsock Control 6.0

When acting as a client (arduino + ethernet shield), are there any libraries that I can use to connect to a server application built using Winsock control in Visual Basic 6.0?
Assuming that there is such a library, how can I define the server port inside the arduino sketch?

Thanks.

This should do it.

  IPAddress server(1,2,3,4);
  // change this to whatever port you want
  int serverPort = 80;

  if(client.connect(server,serverPort))
  {
    Serial.println(F("connected"));
  }

edit: Windows is probably going to block your attempt to connect with the server firewall. Insure you allow that port through.

I am so sorry! :blush: I get most of my exercise jumping to conclusions.

Here is an example of a http client sketch
http://playground.arduino.cc/Code/WebClient

Here is FTP passive client code. It uses two ports and the SD at the same time.
http://playground.arduino.cc/Code/FTP

Here is email sending code. It sends more like server-to-server than client-to-server.
http://playground.arduino.cc/Code/Email

Feel free to hack away at any of that code. Mix and match. :slight_smile:

Thank you SurferTim. It worked :slight_smile: