Beispiel #1
0
//	Sending msg to all children.
func (s *Server) AskChildren(msg string) {
	message := sip.GetMessage(msg)

	for i := 0; i < s.ChildNumber; i++ {
		child := s.Children[i]
		socket, _ := net.Dial("tcp", child+":666")
		sip.Request(socket, message)
	}
}
Beispiel #2
0
//	Sending msg to parent.
func (s *Server) TellParent(msg string) {
	message := sip.GetMessage(msg)

	socket, _ := net.Dial("tcp", s.Parent+":666")
	sip.Request(socket, message)
}