This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088
Dependents: MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more
NyLPC_cHttpd.h
00001 00002 #ifndef NYLPC_CHTTPD_H_ 00003 #define NYLPC_CHTTPD_H_ 00004 00005 #include "NyLPC_stdlib.h" 00006 #include "../NyLPC_cNetConfig.h" 00007 #include "NyLPC_cHttpdThread.h" 00008 00009 #ifdef __cplusplus 00010 extern "C" { 00011 #endif /* __cplusplus */ 00012 00013 /** 00014 * HTTPコネクションスレッドの数 00015 */ 00016 #ifndef NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD 00017 # define NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD 3 00018 #endif 00019 00020 /** 00021 * 持続性接続を許可するコネクションの数 00022 * NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD-1以下にしてください。 00023 */ 00024 #ifndef NyLPC_cHttpd_MAX_PERSISTENT_CONNECTION 00025 # define NyLPC_cHttpd_MAX_PERSISTENT_CONNECTION (NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD-1) 00026 #endif 00027 00028 00029 00030 00031 00032 #ifndef DEFINE_NyLPC_TcHttpdConnection_t 00033 typedef struct NyLPC_TcHttpdConnection NyLPC_TcHttpdConnection_t; 00034 #define DEFINE_NyLPC_TcHttpdConnection_t 00035 #endif 00036 00037 00038 00039 00040 00041 typedef void (*NyLPC_TcHttpd_onRequest)(NyLPC_TcHttpdConnection_t* i_inst); 00042 00043 /** 00044 * class definition 00045 */ 00046 #ifndef DEFINE_NyLPC_TcHttpd_t 00047 typedef struct NyLPC_TcHttpd NyLPC_TcHttpd_t; 00048 #define DEFINE_NyLPC_TcHttpd_t 00049 #endif 00050 struct NyLPC_TcHttpd 00051 { 00052 struct{ 00053 NyLPC_TcHttpd_onRequest onRequest; 00054 }function; 00055 NyLPC_TcMutex_t _mutex; 00056 NyLPC_TiTcpListener_t* _listener; 00057 NyLPC_TcHttpdThread_t _thread[NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD]; 00058 NyLPC_TInt16 _num_of_active_connection; 00059 }; 00060 00061 00062 00063 00064 NyLPC_TBool NyLPC_cHttpd_initialize(NyLPC_TcHttpd_t* i_inst,NyLPC_TUInt16 i_port_number); 00065 void NyLPC_cHttpd_finalize(NyLPC_TcHttpd_t* i_inst); 00066 void NyLPC_cHttpd_loop(NyLPC_TcHttpd_t* i_inst); 00067 void NyLPC_cHttpd_lock(NyLPC_TcHttpd_t* i_inst); 00068 void NyLPC_cHttpd_unlock(NyLPC_TcHttpd_t* i_inst); 00069 00070 00071 #ifdef __cplusplus 00072 } 00073 #endif /* __cplusplus */ 00074 00075 #endif /* NYLPC_CHTTPD_H_ */
Generated on Tue Jul 12 2022 15:46:15 by 1.7.2