Make ABC compatible across python 2-3.
Encode socket subscription.