Update functions.cpp

Small fix for https://github.com/ant-lafarge/QtWebsocket/issues/21
Merge pull request #22 from Hronom/patch-1

Update functions.cpp