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()); }
public void TestNotExistsOff() { var connector = new KcpConnector(100, "127.0.0.1", 7777); connector.Off("NotExists", (p) => { }); }