示例#1
0
        public void Start(int port)
        {
            listener.Listen(port);

            var timer = Observable.Timer(TimeSpan.FromSeconds(2), TimeSpan.FromSeconds(5));

            timer.Subscribe(t => Broadcast(heartbeatFactory.CreateHeartBeat()));

            AcceptClientsAsync(listener);
        }