improve state handling
the running/stopped state handling is incorrect. Since func (c *Client) Start() (bool, error)
is blocking and only left on an error or after func (c *Client) Stop() (bool, error)
has been called, the boolean c.started
is set too late to true (l.76 in Start()) - when actually the client is about to stop.
Instead I would like suggest to implement sth like:
func (c *Client) IsStarted() bool {
return c.server != nil
}