提交文件上传代码

This commit is contained in:
duanhf2012
2020-03-10 14:07:02 +08:00
parent 03f41f2925
commit 67cabfa105
4 changed files with 21 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
"LogLevel":1,
"HttpPort":9400,
"WSPort":9401,
"ListenPort":9402,
"ListenPort":9412,
"CAFile":[
{
"CertFile":"",
@@ -23,7 +23,7 @@
"NodeList":[
{
"NodeID":1,
"NodeAddr": "127.0.0.1:8081",
"NodeAddr": "127.0.0.1:8181",
"LogLevel":1,
"HttpPort":7001,
"WSPort":7000,

View File

@@ -52,8 +52,6 @@ type InputData struct {
//OnRun ...
func (ws *SubNet1_Service) OnRun() bool {
time.Sleep(time.Second * 10)
var cli network.TcpSocketClient
cli.Connect("127.0.0.1:9402")

View File

@@ -33,15 +33,15 @@ func main() {
}
//打开Module死循环监控
node.EnableMonitorModule(time.Second*5)
node.EnableMonitorModule(time.Minute*5)
originhttp.SetStaticResource(originhttp.METHOD_GET,"/img/","d:/")
nodeCfg, _ := cluster.ReadNodeConfig("./config/nodeconfig.json", cluster.GetNodeId())
httpserver := originhttp.NewHttpServerService(nodeCfg.HttpPort) // http服务
for _, ca := range nodeCfg.CAFile {
httpserver.SetHttps(ca.CertFile, ca.KeyFile)
}
pTcpService := sysservice.NewTcpSocketPbService(":9402")
pTcpService := sysservice.NewTcpSocketPbService(":9412")
pTcpService.SetServiceName("ls")
/*
pTcpService2 := sysservice.NewTcpSocketPbService(":9005")