Merge pull request #51 from cowboy129/master

Expose connection status
Merge pull request #52 from cowboy129/master

Add preReceive and postReceive hooks
Fix MatchError