SimpleSocket 1.0 examples

Dependencies:   EthernetNetIf SimpleSocket 1.0 mbed

main.cpp

Committer:
yamaguch
Date:
2011-09-12
Revision:
25:b3ab82301345
Parent:
24:9c7a2e830ef6
Child:
26:6f42de9d8ed8

File content as of revision 25:b3ab82301345:

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

void echoserver(int port);
void echoserver2(int port);
void echoclient(char *server, int port, char *message);
void httpclient(char *url);
void relayserver(int port, char *target, int targetport);

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

    //echoserver(7777);
    echoserver2(7777);
    //echoclient("10.0.3.17", 7777, "Hello world\n");
    //httpclient("http://www.senio.co.jp/index.html");
    //relayserver(8888, "10.0.3.17", 1234);
}