This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088
Dependents: MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more
NyLPC_cMiMicIpTcpListener.h
00001 /********************************************************************************* 00002 * PROJECT: MiMic 00003 * -------------------------------------------------------------------------------- 00004 * 00005 * This file is part of MiMic 00006 * Copyright (C)2011 Ryo Iizuka 00007 * 00008 * MiMic is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published 00010 * by the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 * 00021 * For further information please contact. 00022 * http://nyatla.jp/ 00023 * <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp> 00024 * 00025 *********************************************************************************/ 00026 #ifndef NYLPC_CTCPLISTENER_H_ 00027 #define NYLPC_CTCPLISTENER_H_ 00028 00029 00030 #include "NyLPC_stdlib.h" 00031 #include "NyLPC_os.h" 00032 #include "../NyLPC_iTcpListener.h" 00033 #include "NyLPC_cMiMicIpTcpSocket.h" 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif /* __cplusplus */ 00037 00038 typedef struct NyLPC_TcMiMicIpTcpListener NyLPC_TcMiMicIpTcpListener_t; 00039 00040 /********************************************************************** 00041 * 00042 * NyLPC_TTcpListenerListenQ struct 00043 * 00044 **********************************************************************/ 00045 00046 #define NyLPC_TcMiMicIpTcpListener_NUMBER_OF_Q 10 00047 00048 struct NyLPC_TTcpListenerListenQ 00049 { 00050 struct NyLPC_TTcpSocketSynParam item[NyLPC_TcMiMicIpTcpListener_NUMBER_OF_Q]; 00051 NyLPC_TUInt16 wp; 00052 }; 00053 00054 00055 /********************************************************************** 00056 * 00057 * NyLPC_TcTcpListener class 00058 * 00059 **********************************************************************/ 00060 00061 /** 00062 * TCP listenerクラス型です。 00063 */ 00064 struct NyLPC_TcMiMicIpTcpListener 00065 { 00066 struct NyLPC_TiTcpListener _super; 00067 NyLPC_TcIPv4_t* _parent_ipv4; 00068 NyLPC_TUInt16 _port; /**<ネットワークオーダーのポート番号*/ 00069 // /** 00070 // * タスク間の調停用Mutex 00071 // * Listener用の共通Mutexポインタ 00072 // */ 00073 // NyLPC_TcMutex_t* _mutex; 00074 /** 00075 * SYNパケットのキュー 00076 */ 00077 struct NyLPC_TTcpListenerListenQ _listen_q; 00078 }; 00079 /** 00080 * この関数は、TCPのリスナーを初期化します。 00081 * 初期化したリスナーをサービスに登録することにより、listen関数を使用できるようになります。 00082 * サービスへの登録は、NyLPC_cUipService_addListenerを使います。 00083 * @param i_port 00084 * ポート番号。host orderです。 00085 */ 00086 NyLPC_TBool NyLPC_cMiMicIpTcpListener_initialize(NyLPC_TcMiMicIpTcpListener_t* i_inst,NyLPC_TUInt16 i_port); 00087 00088 /** 00089 * この関数は、一定時間i_sockに接続を受け付けます。 00090 */ 00091 NyLPC_TBool NyLPC_cMiMicIpTcpListener_listen(NyLPC_TcMiMicIpTcpListener_t* i_inst,NyLPC_TcMiMicIpTcpSocket_t* i_sock,NyLPC_TUInt32 i_wait_msec); 00092 00093 00094 #ifdef __cplusplus 00095 } 00096 #endif /* __cplusplus */ 00097 00098 #endif /* NYLPC_CTCPLISTENER_H_ */
Generated on Tue Jul 12 2022 15:46:16 by 1.7.2