MQTT client test with W5200 ethernet shield
Dependents: IBMIoTClientEthernetExample_W5200
Fork of W5500Interface by
Diff: Socket/TCPSocketServer.cpp
- Revision:
- 5:8aefaef88f79
- Parent:
- 4:af0ed4fbca02
diff -r af0ed4fbca02 -r 8aefaef88f79 Socket/TCPSocketServer.cpp --- a/Socket/TCPSocketServer.cpp Mon Sep 01 01:54:29 2014 +0000 +++ b/Socket/TCPSocketServer.cpp Fri Sep 26 08:05:41 2014 +0000 @@ -31,11 +31,11 @@ } } // set TCP protocol - eth->setProtocol(_sock_fd, TCP); + eth->setProtocol(_sock_fd, WIZnet_Chip::TCP); // set local port eth->sreg<uint16_t>(_sock_fd, Sn_PORT, port); // connect the network - eth->scmd(_sock_fd, OPEN); + eth->scmd(_sock_fd, WIZnet_Chip::OPEN); return 0; } @@ -47,7 +47,7 @@ if (backlog != 1) { return -1; } - eth->scmd(_sock_fd, LISTEN); + eth->scmd(_sock_fd, WIZnet_Chip::LISTEN); return 0; } @@ -64,7 +64,7 @@ if (t.read_ms() > _timeout && _blocking == false) { return -1; } - if (eth->sreg<uint8_t>(_sock_fd, Sn_SR) == SOCK_ESTABLISHED) { + if (eth->sreg<uint8_t>(_sock_fd, Sn_SR) == WIZnet_Chip::SOCK_ESTABLISHED) { break; } }