// Connect to node by address.
// Client handle function need be not null.
Connect to node by address.
Client handle function need be not null.
// Connect to node by address . // Client handle function need be not null .
func (node *Node) Connect(address string) error {
	if node.isMaxConnSize() {
		return errors.New("max conn")
	}
	conn, err := net.Dial("tcp", address)
	if err != nil {
		return err
	}
	node.setConnection(address, conn)
	go node.handleConn(address)
	return nil
}
func ( node * Node ) Connect ( address string ) error { if node . isMaxConnSize ( ) { return errors . New ( " " ) } conn , err := net . Dial ( " " , address ) if err != nil { return err } node . setConnection ( address , conn ) go node . handleConn ( address ) return nil }
Connect to node by address.
Connect to node by address .