SimpleSocket 1.0 examples

Dependencies:   EthernetNetIf SimpleSocket 1.0 mbed

Committer:
yamaguch
Date:
Wed Oct 26 12:47:31 2011 +0000
Revision:
32:00114e36de90
Parent:
26:6f42de9d8ed8
Child:
33:39d9cdf99de8
UDP added

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yamaguch 1:7350a2598a80 1 #include "EthernetNetIf.h"
yamaguch 4:59056313fbfa 2 #include "SimpleSocket.h"
yamaguch 2:304672a01127 3
yamaguch 26:6f42de9d8ed8 4 void scanftest(int port);
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 32:00114e36de90 10 void webserver();
yamaguch 32:00114e36de90 11 void udpsend();
yamaguch 32:00114e36de90 12 void udpreceive();
yamaguch 32:00114e36de90 13 void multicast();
yamaguch 32:00114e36de90 14 void ntpclient();
yamaguch 32:00114e36de90 15 void supertweet();
yamaguch 1:7350a2598a80 16
yamaguch 1:7350a2598a80 17 int main() {
yamaguch 4:59056313fbfa 18 EthernetNetIf eth;
yamaguch 4:59056313fbfa 19 EthernetErr ethErr = eth.setup();
yamaguch 4:59056313fbfa 20 if (ethErr) error("Error %d in setup.\n", ethErr);
yamaguch 32:00114e36de90 21 //supertweet();
yamaguch 32:00114e36de90 22 //ntpclient();
yamaguch 32:00114e36de90 23 multicast();
yamaguch 32:00114e36de90 24 //udpsend();
yamaguch 32:00114e36de90 25 //udpreceive();
yamaguch 32:00114e36de90 26 //webserver();
yamaguch 32:00114e36de90 27 //scanftest(7777);
yamaguch 24:9c7a2e830ef6 28 //echoserver(7777);
yamaguch 26:6f42de9d8ed8 29 //echoserver2(7777);
yamaguch 17:50c0e9c5ca79 30 //echoclient("10.0.3.17", 7777, "Hello world\n");
yamaguch 25:b3ab82301345 31 //httpclient("http://www.senio.co.jp/index.html");
yamaguch 21:a3cf1f055a4d 32 //relayserver(8888, "10.0.3.17", 1234);
yamaguch 0:c41b68a4a296 33 }