on/offline implement
basic version
fix bug on message length
Merge branch 'd'