multithread for dictateNode.

pull/37/head
Richard Liu 6 years ago
parent 6237990c14
commit 7600c9e3e7
  1. 6
      aws-experiment-launch/experiment/commander/main.go

@ -75,6 +75,11 @@ func dictateNodes(command string) {
port := "1" + config[1] // the port number of solider is "1" + node port
addr := strings.Join([]string{ip, port}, ":")
go dictateNode(addr, command)
}
}
func dictateNode(addr string, command string) {
// creates client
conn, err := net.Dial("tcp", addr)
if err != nil {
@ -95,7 +100,6 @@ func dictateNodes(command string) {
buff := make([]byte, 1024)
n, _ := conn.Read(buff)
log.Printf("Receive from %s: %s", addr, buff[:n])
}
}
func hostConfigFile() {

Loading…
Cancel
Save