import pynng with pynng.Pair0(listen='tcp://127.0.0.1:54321') as s1: with pynng.Pair0(listen='tcp://127.0.0.1:54321') as s2: pass