From 2fc2cf46a83ade3cf44bcc5cf88f456b1c2c8854 Mon Sep 17 00:00:00 2001 From: follower Date: Tue, 11 Dec 2007 11:14:44 +0000 Subject: [PATCH] Change connection listen method to return a boolean indicating whether the socket began to listen successfully. TODO: Use this value usefully. git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@109 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b --- branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde b/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde index ed80337..3dc7aee 100644 --- a/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde +++ b/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde @@ -225,7 +225,7 @@ class NetworkConnection { // Essentially a Socket wrapper public: NetworkConnection(uint16_t port); // TODO: Add UDP, TCP choice? - void listen(); // TODO: Return a useful value? + int listen(); int isConnected(); byte read(); void NetworkConnection::close(); @@ -243,11 +243,11 @@ NetworkConnection::NetworkConnection(uint16_t port) { socket(_socket, Sn_MR_TCP, port, 0); } -void NetworkConnection::listen() { // TODO: Make private or protected? +int NetworkConnection::listen() { // TODO: Make private or protected? /* */ - ::listen(_socket); // TODO: Use C++ namespaces for the driver functions? + return !!::listen(_socket); // TODO: Use C++ namespaces for the driver functions? } byte NetworkConnection::read() {