Add error management for broken connections

The player now reports an error if the connection is broken. The timeout defaults to 10 seconds and can be set through the config function.

This resolves issue #48.