Hi,
The program contains;
EthernetInterface eth;
eth.init();
eth.connect();
pc.printf("IP Address is %s\n\r", eth.getIPAddress());
TCPSocketServer server;
server.bind(ECHO_SERVER_PORT);
server.listen();
pc.puts("\r\nWait for new connection...\n\r");
TCPSocketConnection socket;
server.accept(socket);
socket.set_blocking(true);
int n = socket.receive(buffer, 1);
All works OK but the socket.receive waits until a char to arrive, this locks up my program.
Is there a way to know upfront that the buffer contains a character?? then i can prevent the locking up.
Thanks,
Gerrit
Hi,
The program contains;
EthernetInterface eth; eth.init(); eth.connect(); pc.printf("IP Address is %s\n\r", eth.getIPAddress());
TCPSocketServer server; server.bind(ECHO_SERVER_PORT); server.listen(); pc.puts("\r\nWait for new connection...\n\r"); TCPSocketConnection socket; server.accept(socket); socket.set_blocking(true); int n = socket.receive(buffer, 1);
All works OK but the socket.receive waits until a char to arrive, this locks up my program.
Is there a way to know upfront that the buffer contains a character?? then i can prevent the locking up.
Thanks, Gerrit