update code snippet
Refactor API

map the API convention on NSURLSession
add heart-beat:0,0 to the CONNECT frame