This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088
Fork of libMiMic by
mbed/Net.h@115:fa79286d8ea4, 2017-02-24 (annotated)
- Committer:
- furutani
- Date:
- Fri Feb 24 04:43:41 2017 +0000
- Revision:
- 115:fa79286d8ea4
- Parent:
- 110:257739f9b31e
Delete missing include line.; Add parameter "timeout" to TCPSocket::connect(), precv().; Fix to send ARP request to default gateway when connecting to IP address of different segment.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nyatla | 3:0a94993be1f6 | 1 | #pragma once |
nyatla | 3:0a94993be1f6 | 2 | //////////////////////////////////////////////////////////////////////////////// |
nyatla | 3:0a94993be1f6 | 3 | // Net.h |
nyatla | 3:0a94993be1f6 | 4 | //////////////////////////////////////////////////////////////////////////////// |
nyatla | 3:0a94993be1f6 | 5 | |
nyatla | 3:0a94993be1f6 | 6 | #include "NyLPC_net.h" |
nyatla | 110:257739f9b31e | 7 | #include "netif/INetIf.h" |
nyatla | 48:00d211aac2ec | 8 | |
nyatla | 3:0a94993be1f6 | 9 | namespace MiMic |
nyatla | 3:0a94993be1f6 | 10 | { |
nyatla | 3:0a94993be1f6 | 11 | class NetConfig; |
nyatla | 3:0a94993be1f6 | 12 | class Net |
nyatla | 3:0a94993be1f6 | 13 | { |
nyatla | 50:35e765380772 | 14 | public: |
nyatla | 50:35e765380772 | 15 | /** |
nyatla | 50:35e765380772 | 16 | * Path of upnp services on HTTP server. |
nyatla | 50:35e765380772 | 17 | */ |
nyatla | 50:35e765380772 | 18 | const static char* UPNP_ROOT_PATH; |
nyatla | 37:fc4b4fd6a649 | 19 | private: |
nyatla | 37:fc4b4fd6a649 | 20 | NyLPC_TcMDnsServer_t* _mdns; |
nyatla | 48:00d211aac2ec | 21 | NyLPC_TcUPnP_t* _upnp; |
nyatla | 3:0a94993be1f6 | 22 | public: |
nyatla | 3:0a94993be1f6 | 23 | /** |
nyatla | 3:0a94993be1f6 | 24 | * The constructor. |
nyatla | 37:fc4b4fd6a649 | 25 | * Must be call after the RTOS started. |
nyatla | 3:0a94993be1f6 | 26 | */ |
nyatla | 110:257739f9b31e | 27 | Net(INetif& i_netif); |
nyatla | 3:0a94993be1f6 | 28 | virtual ~Net(); |
nyatla | 37:fc4b4fd6a649 | 29 | /** |
nyatla | 37:fc4b4fd6a649 | 30 | * This function starts networking with configulation. |
nyatla | 37:fc4b4fd6a649 | 31 | * @param i_cfg |
nyatla | 37:fc4b4fd6a649 | 32 | * configuration parameter. |
nyatla | 37:fc4b4fd6a649 | 33 | * Must be hold until instance is freed. |
nyatla | 37:fc4b4fd6a649 | 34 | * This may be changed by initializer it has DHCP or AUTOIP flag. |
nyatla | 37:fc4b4fd6a649 | 35 | */ |
nyatla | 37:fc4b4fd6a649 | 36 | void start(NetConfig& i_cfg); |
nyatla | 37:fc4b4fd6a649 | 37 | void stop(); |
nyatla | 48:00d211aac2ec | 38 | public: |
nyatla | 48:00d211aac2ec | 39 | /** |
nyatla | 48:00d211aac2ec | 40 | * UPnP instance |
nyatla | 48:00d211aac2ec | 41 | */ |
nyatla | 48:00d211aac2ec | 42 | const NyLPC_TcUPnP_t* refUPnPInstance()const{return this->_upnp;} |
nyatla | 3:0a94993be1f6 | 43 | }; |
nyatla | 109:18f12ac01097 | 44 | } |