Skip to content

Instantly share code, notes, and snippets.

@perezd
Created February 10, 2012 06:59
Show Gist options
  • Save perezd/30d46f96343ce8095548 to your computer and use it in GitHub Desktop.
Save perezd/30d46f96343ce8095548 to your computer and use it in GitHub Desktop.
#ifndef WIFLYCLIENT_H
#define WIFLYCLIENT_H
#include "Arduino.h"
#include <WiFlySerial.h>
#include <SoftwareSerial.h>
#include <Streaming.h>
class WiFlyClient {
public:
// constructor expects an initialized, and fully
// connected instance of the WiFly driver.
// Let the user worry about authentication and pin mapping.
WiFlyClient(WiFlySerial *WiFly);
int connect(char hostname[], char path[] = "/", int port = 80);
void print(const char *str);
void print(const String *str);
void println(const String *str);
int read();
int available();
bool connected();
void stop();
operator bool();
private:
WiFlySerial _WiFly;
int _port;
char _hostname[];
char _path[];
};
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment