Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
7f885cb3
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7f885cb3
编写于
8月 14, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1057
上级
8ac389c6
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
9 addition
and
9 deletion
+9
-9
src/kit/taosnetwork/client.c
src/kit/taosnetwork/client.c
+2
-2
src/kit/taosnetwork/server.c
src/kit/taosnetwork/server.c
+3
-3
src/os/inc/osSocket.h
src/os/inc/osSocket.h
+1
-1
src/os/src/detail/osSocket.c
src/os/src/detail/osSocket.c
+1
-1
src/os/src/windows/w64Socket.c
src/os/src/windows/w64Socket.c
+1
-1
src/plugins/http/src/httpServer.c
src/plugins/http/src/httpServer.c
+1
-1
未找到文件。
src/kit/taosnetwork/client.c
浏览文件 @
7f885cb3
...
...
@@ -91,7 +91,7 @@ int checkTcpPort(info_s *info) {
serverAddr
.
sin_family
=
AF_INET
;
serverAddr
.
sin_port
=
htons
(
port
);
serverAddr
.
sin_addr
.
s_addr
=
taosInetA
ddr
(
host
);
serverAddr
.
sin_addr
.
s_addr
=
inet_a
ddr
(
host
);
//printf("=================================\n");
if
(
connect
(
clientSocket
,
(
struct
sockaddr
*
)
&
serverAddr
,
sizeof
(
serverAddr
))
<
0
)
{
...
...
@@ -157,7 +157,7 @@ int checkUdpPort(info_s *info) {
serverAddr
.
sin_family
=
AF_INET
;
serverAddr
.
sin_port
=
htons
(
port
);
serverAddr
.
sin_addr
.
s_addr
=
taosInetA
ddr
(
host
);
serverAddr
.
sin_addr
.
s_addr
=
inet_a
ddr
(
host
);
memset
(
sendbuf
,
0
,
BUFFER_SIZE
);
memset
(
recvbuf
,
0
,
BUFFER_SIZE
);
...
...
src/kit/taosnetwork/server.c
浏览文件 @
7f885cb3
...
...
@@ -128,7 +128,7 @@ static void *bindTcpPort(void *sarg) {
if
(
errno
==
EINTR
)
{
continue
;
}
else
{
printf
(
"recv Client: %s pkg from TCP port: %d fail:%s.
\n
"
,
taosInetN
toa
(
clientAddr
.
sin_addr
),
port
,
strerror
(
errno
));
printf
(
"recv Client: %s pkg from TCP port: %d fail:%s.
\n
"
,
inet_n
toa
(
clientAddr
.
sin_addr
),
port
,
strerror
(
errno
));
close
(
serverSocket
);
return
NULL
;
}
...
...
@@ -139,7 +139,7 @@ static void *bindTcpPort(void *sarg) {
}
}
printf
(
"recv Client: %s pkg from TCP port: %d, pkg len: %d
\n
"
,
taosInetN
toa
(
clientAddr
.
sin_addr
),
port
,
iDataNum
);
printf
(
"recv Client: %s pkg from TCP port: %d, pkg len: %d
\n
"
,
inet_n
toa
(
clientAddr
.
sin_addr
),
port
,
iDataNum
);
if
(
iDataNum
>
0
)
{
send
(
client
,
buffer
,
iDataNum
,
0
);
break
;
...
...
@@ -188,7 +188,7 @@ static void *bindUdpPort(void *sarg) {
continue
;
}
if
(
iDataNum
>
0
)
{
printf
(
"recv Client: %s pkg from UDP port: %d, pkg len: %d
\n
"
,
taosInetN
toa
(
clientAddr
.
sin_addr
),
port
,
iDataNum
);
printf
(
"recv Client: %s pkg from UDP port: %d, pkg len: %d
\n
"
,
inet_n
toa
(
clientAddr
.
sin_addr
),
port
,
iDataNum
);
//printf("Read msg from udp:%s ... %s\n", buffer, buffer+iDataNum-16);
sendto
(
serverSocket
,
buffer
,
iDataNum
,
0
,
(
struct
sockaddr
*
)
&
clientAddr
,
(
int
)
sin_size
);
...
...
src/os/inc/osSocket.h
浏览文件 @
7f885cb3
...
...
@@ -67,7 +67,7 @@ int taosSetSockOpt(SOCKET socketfd, int level, int optname, void *optval, int op
// TAOS_OS_FUNC_SOCKET_INET
uint32_t
taosInetAddr
(
char
*
ipAddr
);
const
char
*
taosInetNtoa
(
IN_ADDR
ipInt
);
const
char
*
taosInetNtoa
(
struct
in_addr
ipInt
);
#ifdef __cplusplus
}
...
...
src/os/src/detail/osSocket.c
浏览文件 @
7f885cb3
...
...
@@ -65,7 +65,7 @@ uint32_t taosInetAddr(char *ipAddr) {
return
inet_addr
(
ipAddr
);
}
const
char
*
taosInetNtoa
(
IN_ADDR
ipInt
)
{
const
char
*
taosInetNtoa
(
struct
in_addr
ipInt
)
{
return
inet_ntoa
(
ipInt
);
}
...
...
src/os/src/windows/w64Socket.c
浏览文件 @
7f885cb3
...
...
@@ -76,7 +76,7 @@ uint32_t taosInetAddr(char *ipAddr) {
}
}
const
char
*
taosInetNtoa
(
IN_ADDR
ipInt
)
{
const
char
*
taosInetNtoa
(
struct
in_addr
ipInt
)
{
// not thread safe, only for debug usage while print log
static
char
tmpDstStr
[
16
];
return
inet_ntop
(
AF_INET
,
&
ipInt
,
tmpDstStr
,
INET6_ADDRSTRLEN
);
...
...
src/plugins/http/src/httpServer.c
浏览文件 @
7f885cb3
...
...
@@ -323,7 +323,7 @@ static void *httpAcceptHttpConnection(void *arg) {
}
pContext
->
pThread
=
pThread
;
sprintf
(
pContext
->
ipstr
,
"%s:%u"
,
taosInet
Addr
(
clientAddr
.
sin_addr
),
htons
(
clientAddr
.
sin_port
));
sprintf
(
pContext
->
ipstr
,
"%s:%u"
,
taosInet
Ntoa
(
clientAddr
.
sin_addr
),
htons
(
clientAddr
.
sin_port
));
struct
epoll_event
event
;
event
.
events
=
EPOLLIN
|
EPOLLPRI
|
EPOLLWAKEUP
|
EPOLLERR
|
EPOLLHUP
|
EPOLLRDHUP
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录