Fixed regression in publisher socket setup

Socket configuration is meant to be done in __init__() for didactic
purposes. Was done with subscriber but not for publisher.