Change 'read' declaration to return an int to match the 'Serial.read' functionality--I don't overly like the approach but that's what I'm wanting to be compatible with. Note: We haven't actually matched the behaviour yet.

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@113 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
follower 17 years ago
parent 695136deb2
commit e76648310b

@ -226,7 +226,7 @@ class NetworkConnection { // Essentially a Socket wrapper
int listen(); int listen();
int isConnected(); int isConnected();
byte read(); int read();
void NetworkConnection::close(); void NetworkConnection::close();
private: private:
@ -249,7 +249,7 @@ int NetworkConnection::listen() { // TODO: Make private or protected?
return !!::listen(_socket); // TODO: Use C++ namespaces for the driver functions? return !!::listen(_socket); // TODO: Use C++ namespaces for the driver functions?
} }
byte NetworkConnection::read() { int NetworkConnection::read() {
/* /*
Note: I thought 'recv' blocked until data was available, Note: I thought 'recv' blocked until data was available,

Loading…
Cancel
Save