Communicating Arduino Shield W5100 Socket Client with PC as a Socket Server


I'm trying to communicate an Arduino with a Shield W5100 the cable is on a switch then the PC, both cables are T-568A standard.
I need to sendo character "A" from arduino and receive receive "A" to confirm that read, then after do a local operation pc will give another signal "%1" that finalized the operation then the arduino will send pin out1 0 to 1 and then will receive pin in2 0 to 1 to close the communication and restart all again.
My problem is with the socket comunication between PC(Server) and Arduino(Client).
I already test the all examples in the internet, but there is no communication for example:

PC port 1985 as a Server
Arduino port 1985 as a Client

#include <Ethernet.h>
#include <SPI.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 0, 1 }; //Arduino with W5100
byte server[] = { 192, 168, 0, 2 }; // PC

EthernetClient client;

void setup()
Ethernet.begin(mac, ip);



if (client.connect(server, 1985)) {
client.println("GET /search?q=arduino HTTP/1.0");
} else {
Serial.println("connection failed");

void loop()
if (client.available()) {
char c =;

if (!client.connected()) {

Please, if somebody can help me i will be thankfull, if do you need more information, feel free to do it.

Thanks in advanced,

Is your PC running a web server?

it is unclear from your post if the shield connects to network and the examples work?

the port could be blocked on PC firewall