tcp_and_proxy/nisroc.py - partial rewrite to a class version