SimpleSocket 1.0 examples
Dependencies: EthernetNetIf SimpleSocket 1.0 mbed
main.cpp
- Committer:
- yamaguch
- Date:
- 2011-09-09
- Revision:
- 21:a3cf1f055a4d
- Parent:
- 17:50c0e9c5ca79
- Child:
- 22:fc886208c19b
File content as of revision 21:a3cf1f055a4d:
#include "mbed.h" #include "EthernetNetIf.h" #include "SimpleSocket.h" void echoserver(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); //echoclient("10.0.3.17", 7777, "Hello world\n"); //httpclient("http://www.senio.co.jp/index.html"); //relayserver(8888, "10.0.3.17", 1234); }