Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of libMiMic by
mbed/mod/ModUrl.cpp@115:fa79286d8ea4, 2017-02-24 (annotated)
- Committer:
- furutani
- Date:
- Fri Feb 24 04:43:41 2017 +0000
- Revision:
- 115:fa79286d8ea4
- Parent:
- 43:a182f2b5ff41
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 | 5:6d67db3875cb | 1 | #include "ModUrl.h" |
nyatla | 5:6d67db3875cb | 2 | #include "HttpdConnection.h" |
nyatla | 5:6d67db3875cb | 3 | |
nyatla | 5:6d67db3875cb | 4 | namespace MiMic |
nyatla | 5:6d67db3875cb | 5 | { |
nyatla | 5:6d67db3875cb | 6 | ModUrl::ModUrl() |
nyatla | 5:6d67db3875cb | 7 | { |
nyatla | 5:6d67db3875cb | 8 | } |
nyatla | 5:6d67db3875cb | 9 | ModUrl::~ModUrl() |
nyatla | 5:6d67db3875cb | 10 | { |
nyatla | 5:6d67db3875cb | 11 | } |
nyatla | 5:6d67db3875cb | 12 | bool ModUrl::execute(HttpdConnection& i_connection,char* o_url_buf,int i_buf_len,int* o_method_type) |
nyatla | 5:6d67db3875cb | 13 | { |
nyatla | 5:6d67db3875cb | 14 | NyLPC_TcModUrl_t mod; |
nyatla | 5:6d67db3875cb | 15 | if(i_buf_len<1){ |
nyatla | 5:6d67db3875cb | 16 | return false; |
nyatla | 5:6d67db3875cb | 17 | } |
nyatla | 5:6d67db3875cb | 18 | NyLPC_cModUrl_initialize(&mod); |
nyatla | 5:6d67db3875cb | 19 | if(!NyLPC_cModUrl_execute(&mod,i_connection._ref_inst,o_url_buf,i_buf_len)){ |
nyatla | 5:6d67db3875cb | 20 | *o_url_buf='\0'; |
nyatla | 5:6d67db3875cb | 21 | } |
nyatla | 5:6d67db3875cb | 22 | if(o_method_type!=NULL){ |
nyatla | 5:6d67db3875cb | 23 | *o_method_type=NyLPC_cModUrl_getMethod(&mod); |
nyatla | 5:6d67db3875cb | 24 | } |
nyatla | 5:6d67db3875cb | 25 | NyLPC_cModUrl_finalize(&mod); |
nyatla | 5:6d67db3875cb | 26 | return true; |
nyatla | 5:6d67db3875cb | 27 | } |
nyatla | 5:6d67db3875cb | 28 | |
nyatla | 5:6d67db3875cb | 29 | } |