Permalink
Browse files

Updated GetPostWebServer and TwilioWebServer in Chapter 10

Both of these examples needed the declarations of class Client changed
to EthernetClient and class Server changed to EthernetServer
  • Loading branch information...
tigoe committed Oct 6, 2011
1 parent 4cae0f1 commit f77ea0664a597a86bd77641bdb9b21db1b03ccc4
@@ -19,7 +19,7 @@ IPAddress subnet(255,255,255,0);
IPAddress ip(192,168,1,20);
// Initialize the Ethernet server library:
-Server server(80);
+EthernetServer server(80);
const int fileStringLength = 16; // length of the file requested
const int typeLength = 6; // length of GET or POST
@@ -181,7 +181,7 @@ boolean checkThermostat() {
}
// send the file that was requested:
-void sendFile(Client thisClient, char thisFile[]) {
+void sendFile(EthernetClient thisClient, char thisFile[]) {
String outputString = ""; // a String to get each line of the file
// open the file for reading:
@@ -238,7 +238,7 @@ void sendFile(Client thisClient, char thisFile[]) {
// send a HTTP header to the client:
-void sendHttpHeader(Client thisClient, int errorCode) {
+void sendHttpHeader(EthernetClient thisClient, int errorCode) {
thisClient.print(F("HTTP/1.1 "));
switch(errorCode) {
case 200: // OK
@@ -19,7 +19,7 @@ IPAddress subnet(255,255,255,0);
IPAddress ip(192,168,1,20);
// Initialize the Ethernet server library:
-Server server(80);
+EthernetServer server(80);
const int fileStringLength = 16; // length of the file requested
const int typeLength = 6; // length of GET or POST (with a little extra)
@@ -180,7 +180,7 @@ boolean checkThermostat() {
}
// send the file that was requested:
-void sendFile(Client thisClient, char thisFile[]) {
+void sendFile(EthernetClient thisClient, char thisFile[]) {
String outputString = ""; // a String to get each line of the file
// open the file for reading:
@@ -249,7 +249,7 @@ void sendFile(Client thisClient, char thisFile[]) {
// send a HTTP header to the client:
-void sendHttpHeader(Client thisClient, int errorCode, int fileSize, int fileType) {
+void sendHttpHeader(EthernetClient thisClient, int errorCode, int fileSize, int fileType) {
thisClient.print(F("HTTP/1.1 "));
switch(errorCode) {
case 200: // OK

0 comments on commit f77ea06

Please sign in to comment.