title: Pattern for using websockets (via socket.io) only on demand for mobile application
body: <p>I'm working on a mobile application that will <em>sometimes</em> need near real time updates, so I'm looking to use websockets when necessary.  Some early testing seems to show that maintaining a using a websocket all the time keeps the data connection on my phone open constantly, causing faster batter drain.</p>
  
  <p>So I'm thinking it will be more battery efficient to use regular ajax style requests most of the time and only use websockets when necessary.</p>
  
  <p>I'm new to socket.io - does it provide any means to manually "downgrade" connections?  If not I will want a communication layer on top of it - can anyone suggest a layer on top of socket.io that would allow me to manually switch between websocket and regular ajax connections?</p>