This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088

Dependents:   MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers NyLPC_iTcpListener.h Source File

NyLPC_iTcpListener.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_ITCPLISTENER_H_
00027 #define NYLPC_ITCPLISTENER_H_
00028 
00029 
00030 #include "NyLPC_stdlib.h"
00031 #include "NyLPC_os.h"
00032 #include "NyLPC_NetIf_ip_types.h"
00033 #include "NyLPC_iTcpSocket.h"
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif /* __cplusplus */
00037 
00038 typedef struct NyLPC_TiTcpListener NyLPC_TiTcpListener_t;
00039 
00040 /**********************************************************************
00041  * Function
00042  **********************************************************************/
00043 
00044 
00045 /**
00046  * 制限時間付きでソケットに接続を待ちます。
00047  */
00048 typedef NyLPC_TBool (*NyLPC_TiTcpListener_listen)(NyLPC_TiTcpListener_t* i_inst,NyLPC_TiTcpSocket_t* i_sock,NyLPC_TUInt32 i_wait_msec);
00049 typedef void (*NyLPC_TiTcpListener_finaize)(NyLPC_TiTcpListener_t* i_inst);
00050 /**********************************************************************
00051  * Interface
00052  **********************************************************************/
00053 
00054 /**
00055  */
00056 struct NyLPC_TiTcpListener_Interface
00057 {
00058     NyLPC_TiTcpListener_listen listen;
00059     NyLPC_TiTcpListener_finaize finalize;
00060 };
00061 
00062 struct NyLPC_TiTcpListener
00063 {
00064     const struct NyLPC_TiTcpListener_Interface* _interface;
00065 };
00066 
00067 #define NyLPC_iTcpListener_listen(i_inst,i_sock,i_wait_msec)    ((i_inst)->_interface->listen((i_inst),(i_sock),(i_wait_msec)))
00068 #define NyLPC_iTcpListener_finaize(i_inst)                      ((i_inst)->_interface->finalize((i_inst)))
00069 
00070 #ifdef __cplusplus
00071 }
00072 #endif /* __cplusplus */
00073 
00074 #endif /* NYLPC_ITCPLISTENER_H_ */
00075