예제 #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
}
예제 #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
}
예제 #3
0
func nodeDisconnected(s *goSocketServer.Socket) {
	fmt.Printf("Node %d Disconnected from Server...\n", s.GetId())
}