tcpx
tcpx copied to clipboard
[Promotion]Profile usage of anchor middleware
Hello, TCPX now provides well practice on anchor middleware, which now can get called without times limit. In the old version, operation below is not allowed:
srv.Use("middle1", middle1)
srv.AddHandler()
srv.UnUse("middle1")
srv.Use("middle1")
...
srv.UnUse("middle1")
Because the same middleware cant't use twice.
Now it's promoted and you can use it well like:
srv.Use("middle1", middle1)
srv.AddHandler()
srv.UnUse("middle1")
srv.Use("middle1")
srv.AddHandler()
srv.AddHandler()
srv.UnUse("middle1")
This promotion is linked below