Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
618b028d
Commit
618b028d
authored
5 years ago
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复拼写错误
parent
c56a0a06
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
12 行增加
和
12 行删除
+12
-12
api/include/mk_util.h
+4
-4
api/source/mk_util.cpp
+4
-4
api/tests/server.c
+2
-2
api/tests/websocket.c
+2
-2
没有找到文件。
api/include/mk_util.h
查看文件 @
618b028d
...
...
@@ -45,20 +45,20 @@ API_EXPORT char* API_CALL mk_util_get_exe_path();
* @param relative_path 同目录下文件的路径相对,可以为null
* @return 文件路径,使用完后需要自己free
*/
API_EXPORT
char
*
API_CALL
mk_u
it
l_get_exe_dir
(
const
char
*
relative_path
);
API_EXPORT
char
*
API_CALL
mk_u
ti
l_get_exe_dir
(
const
char
*
relative_path
);
/**
* 获取unix标准的系统时间戳
* @return 当前系统时间戳
*/
API_EXPORT
uint64_t
API_CALL
mk_u
it
l_get_current_millisecond
();
API_EXPORT
uint64_t
API_CALL
mk_u
ti
l_get_current_millisecond
();
/**
* 获取时间字符串
* @param fmt 时间格式,譬如%Y-%m-%d %H:%M:%S
* @return 时间字符串,使用完后需要自己free
*/
API_EXPORT
char
*
API_CALL
mk_u
it
l_get_current_time_string
(
const
char
*
fmt
);
API_EXPORT
char
*
API_CALL
mk_u
ti
l_get_current_time_string
(
const
char
*
fmt
);
/**
* 打印二进制为字符串
...
...
@@ -66,7 +66,7 @@ API_EXPORT char* API_CALL mk_uitl_get_current_time_string(const char *fmt);
* @param len 数据长度
* @return 可打印的调试信息,使用完后需要自己free
*/
API_EXPORT
char
*
API_CALL
mk_u
it
l_hex_dump
(
const
void
*
buf
,
int
len
);
API_EXPORT
char
*
API_CALL
mk_u
ti
l_hex_dump
(
const
void
*
buf
,
int
len
);
///////////////////////////////////////////日志/////////////////////////////////////////////
/**
...
...
This diff is collapsed.
Click to expand it.
api/source/mk_util.cpp
查看文件 @
618b028d
...
...
@@ -35,23 +35,23 @@ API_EXPORT char* API_CALL mk_util_get_exe_path(){
return
strdup
(
exePath
().
data
());
}
API_EXPORT
char
*
API_CALL
mk_u
it
l_get_exe_dir
(
const
char
*
relative_path
){
API_EXPORT
char
*
API_CALL
mk_u
ti
l_get_exe_dir
(
const
char
*
relative_path
){
if
(
relative_path
){
return
strdup
((
exeDir
()
+
relative_path
).
data
());
}
return
strdup
(
exeDir
().
data
());
}
API_EXPORT
uint64_t
API_CALL
mk_u
it
l_get_current_millisecond
(){
API_EXPORT
uint64_t
API_CALL
mk_u
ti
l_get_current_millisecond
(){
return
getCurrentMillisecond
();
}
API_EXPORT
char
*
API_CALL
mk_u
it
l_get_current_time_string
(
const
char
*
fmt
){
API_EXPORT
char
*
API_CALL
mk_u
ti
l_get_current_time_string
(
const
char
*
fmt
){
assert
(
fmt
);
return
strdup
(
getTimeStr
(
fmt
).
data
());
}
API_EXPORT
char
*
API_CALL
mk_u
it
l_hex_dump
(
const
void
*
buf
,
int
len
){
API_EXPORT
char
*
API_CALL
mk_u
ti
l_hex_dump
(
const
void
*
buf
,
int
len
){
assert
(
buf
&&
len
>
0
);
return
strdup
(
hexdump
(
buf
,
len
).
data
());
}
...
...
This diff is collapsed.
Click to expand it.
api/tests/server.c
查看文件 @
618b028d
...
...
@@ -396,8 +396,8 @@ static void s_on_exit(int sig){
flag
=
0
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
char
*
ini_path
=
mk_u
it
l_get_exe_dir
(
"c_api.ini"
);
char
*
ssl_path
=
mk_u
it
l_get_exe_dir
(
"ssl.p12"
);
char
*
ini_path
=
mk_u
ti
l_get_exe_dir
(
"c_api.ini"
);
char
*
ssl_path
=
mk_u
ti
l_get_exe_dir
(
"ssl.p12"
);
mk_config
config
=
{
.
ini
=
ini_path
,
...
...
This diff is collapsed.
Click to expand it.
api/tests/websocket.c
查看文件 @
618b028d
...
...
@@ -195,8 +195,8 @@ void test_client(){
}
int
main
(
int
argc
,
char
*
argv
[])
{
char
*
ini_path
=
mk_u
it
l_get_exe_dir
(
"c_api.ini"
);
char
*
ssl_path
=
mk_u
it
l_get_exe_dir
(
"ssl.p12"
);
char
*
ini_path
=
mk_u
ti
l_get_exe_dir
(
"c_api.ini"
);
char
*
ssl_path
=
mk_u
ti
l_get_exe_dir
(
"ssl.p12"
);
mk_config
config
=
{
.
ini
=
ini_path
,
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论