Esempio n. 1
0
        protected Task <string> Call(StationDesc func, string message)
        {
            var finished = _station.Grab(func).When(MsgType.Signal);

            _station.Send(MsgType.Link, message).To(func);
            return(finished);
        }
Esempio n. 2
0
        public void Open(IStation station, string[] args)
        {
            this.station = station;
            if (args.Length > 0 && Int32.TryParse(args[0], out var c))
            {
                this.cnt = c;
            }

            station.Grab(ponger).Signaled += handlePong;

            station.Send(MsgType.Link, "").To(ponger);

            if (this.cnt > 0)
            {
                ping();
            }
            else
            {
                station.Close();
            }
        }