xref: /f-stack/app/micro_thread/mt_concurrent.h (revision 35a81399)
1 
2 /**
3  * Tencent is pleased to support the open source community by making MSEC available.
4  *
5  * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
6  *
7  * Licensed under the GNU General Public License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License. You may
9  * obtain a copy of the License at
10  *
11  *     https://opensource.org/licenses/GPL-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software distributed under the
14  * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15  * either express or implied. See the License for the specific language governing permissions
16  * and limitations under the License.
17  */
18 
19 
20 /**
21  *  @file mt_concurrent.h
22  *  @time 20130515
23  **/
24 
25 #ifndef __MT_CONCURRENT_H__
26 #define __MT_CONCURRENT_H__
27 
28 #include <netinet/in.h>
29 #include <vector>
30 
31 namespace NS_MICRO_THREAD {
32 
33 using std::vector;
34 
35 class IMtAction;
36 typedef vector<IMtAction*>  IMtActList;
37 
38 
39 int mt_msg_sendrcv(IMtActList& req_list, int timeout);
40 
41 int mt_multi_netfd_poll(IMtActList& req_list, int how, int timeout);
42 
43 int mt_multi_newsock(IMtActList& req_list);
44 
45 int mt_multi_open(IMtActList& req_list, int timeout);
46 
47 int mt_multi_sendto(IMtActList& req_list, int timeout);
48 
49 int mt_multi_recvfrom(IMtActList& req_list, int timeout);
50 
51 int mt_multi_sendrcv_ex(IMtActList& req_list, int timeout);
52 
53 }
54 
55 
56 
57 #endif
58 
59 
60