未验证 提交 c9bd8907 编写于 作者: Y Yang Zhao 提交者: GitHub

enh: taos shell support cloud service (#13883)

* enh: support url in commandline taos shell

* fix: normal host logic

* enh: add default -R if env var set

* fix: refine taos shell cloud service

* fix: improve user friendly

* fix: add cloud tcp connection

* fix: header file

* fix: default restul

* fix: other plat os
上级 e3d09a8d
...@@ -583,9 +583,11 @@ int tcpConnect(char* host, int port) { ...@@ -583,9 +583,11 @@ int tcpConnect(char* host, int port) {
struct sockaddr_in serv_addr; struct sockaddr_in serv_addr;
if (port == 0) { if (port == 0) {
port = 6041; port = 6041;
args.port = 6041;
} }
if (NULL == host) { if (NULL == host) {
host = "localhost"; host = "localhost";
args.host = "localhost";
} }
struct hostent *server = gethostbyname(host); struct hostent *server = gethostbyname(host);
......
...@@ -613,9 +613,11 @@ int tcpConnect(char* host, int port) { ...@@ -613,9 +613,11 @@ int tcpConnect(char* host, int port) {
struct sockaddr_in serv_addr; struct sockaddr_in serv_addr;
if (port == 0) { if (port == 0) {
port = 6041; port = 6041;
args.port = 6041;
} }
if (NULL == host) { if (NULL == host) {
host = "localhost"; host = "localhost";
args.host = "localhost";
} }
struct hostent *server = gethostbyname(host); struct hostent *server = gethostbyname(host);
......
...@@ -377,9 +377,11 @@ int tcpConnect(char* host, int iport) { ...@@ -377,9 +377,11 @@ int tcpConnect(char* host, int iport) {
hints; hints;
if (iport == 0) { if (iport == 0) {
iport = 6041; iport = 6041;
args.port = 6041
} }
if (NULL == host) { if (NULL == host) {
host = "localhost"; host = "localhost";
args.host = "localhost";
} }
char port[10] = {0}; char port[10] = {0};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册