Пример #1
0
        public void TestRemoveAllOff()
        {
            var             connector = new KcpConnector(100, "127.0.0.1", 7777);
            Action <object> call      = (ex) =>
            {
                Assert.Fail();
            };

            connector.On(SocketEvents.Error, call);
            connector.On(SocketEvents.Error, call);
            connector.Off(SocketEvents.Error, call);
            connector.Trigger(SocketEvents.Error, new Exception());
        }
Пример #2
0
        public void TestNotExistsOff()
        {
            var connector = new KcpConnector(100, "127.0.0.1", 7777);

            connector.Off("NotExists", (p) => { });
        }