Merge pull request #33 from cowboy129/master

Fix bugs that OnConnect and OnDisconnect are not triggered
Move examples to submodule