SimpleSocket 1.0 examples

Dependencies:   EthernetNetIf SimpleSocket 1.0 mbed

main.cpp

Committer:
yamaguch
Date:
2011-08-17
Revision:
6:8c44fe7acb82
Parent:
4:59056313fbfa
Child:
7:d57efbdb6517

File content as of revision 6:8c44fe7acb82:

#include "mbed.h"
#include "EthernetNetIf.h"
#include "SimpleSocket.h"

void echoserver(int port);
void httpclient(char *url);
void simpleclient(char *servername, int port);

int main() {
    EthernetNetIf eth;
    EthernetErr ethErr = eth.setup();
    if (ethErr) error("Error %d in setup.\n", ethErr);

    //echoserver(7);
    httpclient("http://www.senio.co.jp/index.html");
    //simpleclient("10.0.3.20", 7);
}