mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 19:51:49 +08:00
更新zltoolkit,适配最新代码
This commit is contained in:
@@ -139,7 +139,7 @@ API_EXPORT void API_CALL mk_tcp_session_send(const mk_tcp_session ctx, const cha
|
||||
API_EXPORT void API_CALL mk_tcp_session_send_buffer_safe(const mk_tcp_session ctx, mk_buffer buffer) {
|
||||
assert(ctx && buffer);
|
||||
try {
|
||||
std::weak_ptr<Session> weak_session = ((SessionForC *) ctx)->shared_from_this();
|
||||
std::weak_ptr<SocketHelper> weak_session = ((SessionForC *) ctx)->shared_from_this();
|
||||
auto ref = mk_buffer_ref(buffer);
|
||||
((SessionForC *) ctx)->async([weak_session, ref]() {
|
||||
auto session_session = weak_session.lock();
|
||||
@@ -149,7 +149,7 @@ API_EXPORT void API_CALL mk_tcp_session_send_buffer_safe(const mk_tcp_session ct
|
||||
mk_buffer_unref(ref);
|
||||
});
|
||||
} catch (std::exception &ex) {
|
||||
WarnL << "can not got the strong pionter of this mk_tcp_session:" << ex.what();
|
||||
WarnL << "can not got the strong pointer of this mk_tcp_session:" << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ void TcpClientForC::onRecv(const Buffer::Ptr &pBuf) {
|
||||
}
|
||||
}
|
||||
|
||||
void TcpClientForC::onErr(const SockException &ex) {
|
||||
void TcpClientForC::onError(const SockException &ex) {
|
||||
if(_events.on_mk_tcp_client_disconnect){
|
||||
_events.on_mk_tcp_client_disconnect(_client,ex.getErrCode(),ex.what());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user