Simplified the socket/publish code.