pserr should send transport with callback,

also fixed outer wrapper for publish so we only publish a single
message
writing tests for pubsub and connect and rpc