SimpleSocket 1.0 examples

Dependencies:   EthernetNetIf SimpleSocket 1.0 mbed

Committer:
yamaguch
Date:
Fri Aug 19 05:18:29 2011 +0000
Revision:
15:ae9aff693b07
Parent:
13:1adb19edf716
Child:
17:50c0e9c5ca79
published as 0.92

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yamaguch 1:7350a2598a80 1 #include "mbed.h"
yamaguch 1:7350a2598a80 2 #include "EthernetNetIf.h"
yamaguch 4:59056313fbfa 3 #include "SimpleSocket.h"
yamaguch 2:304672a01127 4
yamaguch 8:b35559c14d17 5 void echoserver(int port);
yamaguch 10:62ce72ee3e91 6 void echoclient(char *server, int port, char *message);
yamaguch 8:b35559c14d17 7 void httpclient(char *url);
yamaguch 15:ae9aff693b07 8 void proxyserver(int port, char *target, int targetport);
yamaguch 1:7350a2598a80 9
yamaguch 1:7350a2598a80 10 int main() {
yamaguch 4:59056313fbfa 11 EthernetNetIf eth;
yamaguch 4:59056313fbfa 12 EthernetErr ethErr = eth.setup();
yamaguch 4:59056313fbfa 13 if (ethErr) error("Error %d in setup.\n", ethErr);
yamaguch 2:304672a01127 14
yamaguch 10:62ce72ee3e91 15 //echoserver(7777);
yamaguch 15:ae9aff693b07 16 //echoclient("10.0.3.20", 7777, "Hello world\n");
yamaguch 15:ae9aff693b07 17 //httpclient("http://www.senio.co.jp/index.html");
yamaguch 15:ae9aff693b07 18 proxyserver(8888, "10.0.3.20", 7777);
yamaguch 0:c41b68a4a296 19 }