OK guys i can confirm this is a bug in the Qt5.3 (linux version at least); as the exact same code on Qt5.5 on windows produces the followin output :
Message received: "Hello, world!"
Close code: 1002
Was already reported btw : [https://bugreports.qt.io/browse/QTBUG-42982](link url)