mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
优化接口命名
This commit is contained in:
parent
a89e81d3f3
commit
d35f1d0bfe
@ -120,7 +120,7 @@ API_EXPORT void* API_CALL mk_tcp_session_get_user_data(mk_tcp_session session);
|
|||||||
* @param port 监听端口号,0则为随机
|
* @param port 监听端口号,0则为随机
|
||||||
* @param type 服务器类型
|
* @param type 服务器类型
|
||||||
*/
|
*/
|
||||||
API_EXPORT uint16_t API_CALL mk_tcp_server_server_start(uint16_t port, mk_tcp_type type);
|
API_EXPORT uint16_t API_CALL mk_tcp_server_start(uint16_t port, mk_tcp_type type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监听tcp服务器事件
|
* 监听tcp服务器事件
|
||||||
|
@ -137,7 +137,7 @@ API_EXPORT void API_CALL mk_tcp_server_events_listen(const mk_tcp_session_events
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT uint16_t API_CALL mk_tcp_server_server_start(uint16_t port, mk_tcp_type type){
|
API_EXPORT uint16_t API_CALL mk_tcp_server_start(uint16_t port, mk_tcp_type type){
|
||||||
type = MAX(mk_type_tcp, MIN(type, mk_type_wss));
|
type = MAX(mk_type_tcp, MIN(type, mk_type_wss));
|
||||||
try {
|
try {
|
||||||
s_tcp_server[type] = std::make_shared<TcpServer>();
|
s_tcp_server[type] = std::make_shared<TcpServer>();
|
||||||
|
@ -172,7 +172,7 @@ void test_server(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
mk_tcp_server_events_listen(&events_server);
|
mk_tcp_server_events_listen(&events_server);
|
||||||
mk_tcp_server_server_start(80,TCP_TYPE);
|
mk_tcp_server_start(80, TCP_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_client(){
|
void test_client(){
|
||||||
|
Loading…
Reference in New Issue
Block a user