Forward socket errors to user

Provide accessors and a signal for socket errors, so that the user
can react accordingly. This closes issue #6