Exemple #1
0
func nodeMessage(s *goSocketServer.Socket, message []byte) {
	fmt.Println("Received Message: ", string(message), " From: ", s.GetId())
	markComplete(nodeToJob[s.GetId()], message)
	delete(nodeToJob, s.GetId())
	Server.pendingNodes <- s
}
Exemple #2
0
func nodeConnected(s *goSocketServer.Socket) {
	fmt.Printf("Node %d Connected to Server...\n", s.GetId())
	s.SendBytes([]byte(Server.program))
	Server.pendingNodes <- s
}
Exemple #3
0
func nodeDisconnected(s *goSocketServer.Socket) {
	fmt.Printf("Node %d Disconnected from Server...\n", s.GetId())
}