liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 1 | #ifndef MBTK_SOCK_INTERNAL_INCLUDE |
| 2 | #define MBTK_SOCK_INTERNAL_INCLUDE |
| 3 | #include "mbtk_sock2.h" |
yq.wang | 39b54a2 | 2025-04-11 15:25:50 +0800 | [diff] [blame] | 4 | |
| 5 | #ifdef MBTK_OPENSSL_V3_0_0_SUPPORT |
| 6 | #include "mbtk_openssl.h" |
| 7 | #endif |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 8 | |
| 9 | #define MBTK_HANDLE_MAX_NUM 5 |
| 10 | #define MBTK_SOCK_MAX_NUM 10 |
| 11 | |
| 12 | typedef struct { |
| 13 | int fd; |
b.liu | 8181e14 | 2023-09-26 10:31:10 +0800 | [diff] [blame] | 14 | mbtk_sock_type type; // socket type:TCP or UDP |
yq.wang | 39b54a2 | 2025-04-11 15:25:50 +0800 | [diff] [blame] | 15 | #ifdef MBTK_OPENSSL_V3_0_0_SUPPORT |
| 16 | mbtk_openssl_info_s ssl_info; |
b.liu | deb8e42 | 2024-12-14 17:36:56 +0800 | [diff] [blame] | 17 | #endif |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 18 | } mbtk_sock_inter_info_s; |
| 19 | |
| 20 | typedef struct { |
| 21 | mbtk_init_info init_info; |
| 22 | int sock_num; |
| 23 | mbtk_sock_inter_info_s inter_infos[MBTK_SOCK_MAX_NUM]; |
| 24 | mbtk_sock_info infos[MBTK_SOCK_MAX_NUM]; |
| 25 | } mbtk_sock_s; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 26 | |
luojin | 8fbb343 | 2023-10-18 09:47:46 +0800 | [diff] [blame] | 27 | #endif /* MBTK_SOCK_INTERNAL_INCLUDE */ |