add long polling support
Merge pull request #49 from pyeremenko/master

add long polling support