SimpleSocket 1.0 examples

Dependencies:   EthernetNetIf SimpleSocket 1.0 mbed

Committer:
yamaguch
Date:
Fri Sep 09 10:31:44 2011 +0000
Revision:
22:fc886208c19b
Parent:
21:a3cf1f055a4d
Child:
24:9c7a2e830ef6
fixed bug - available()/read()

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 22:fc886208c19b 6 void echoserver2(int port);
yamaguch 10:62ce72ee3e91 7 void echoclient(char *server, int port, char *message);
yamaguch 8:b35559c14d17 8 void httpclient(char *url);
yamaguch 17:50c0e9c5ca79 9 void relayserver(int port, char *target, int targetport);
yamaguch 1:7350a2598a80 10
yamaguch 1:7350a2598a80 11 int main() {
yamaguch 4:59056313fbfa 12 EthernetNetIf eth;
yamaguch 4:59056313fbfa 13 EthernetErr ethErr = eth.setup();
yamaguch 4:59056313fbfa 14 if (ethErr) error("Error %d in setup.\n", ethErr);
yamaguch 2:304672a01127 15
yamaguch 21:a3cf1f055a4d 16 echoserver(7777);
yamaguch 22:fc886208c19b 17 //echoserver2(7777);
yamaguch 17:50c0e9c5ca79 18 //echoclient("10.0.3.17", 7777, "Hello world\n");
yamaguch 15:ae9aff693b07 19 //httpclient("http://www.senio.co.jp/index.html");
yamaguch 21:a3cf1f055a4d 20 //relayserver(8888, "10.0.3.17", 1234);
yamaguch 0:c41b68a4a296 21 }