title: WebSocket server in PyQt5, apparently correct, however I can not connect
body: <p>I need make a websocket server in pyqt5, read the documentation from the 5.3 version there is all necessary classes, follow these example in C ++
  <a href="http://doc.qt.io/qt-5/qtwebsockets-examples.html" rel="nofollow">http://doc.qt.io/qt-5/qtwebsockets-examples.html</a>
  and this was the result:</p>
  
  <pre><code>from PyQt5 import QtCore, QtWebSockets,  QtNetwork
  
  class MyServer(QtCore.QObject):
      def __init__(self,  parent=None):
          super(QtCore.QObject, self).__init__(parent)
          self.server = QtWebSockets.QWebSocketServer('My Socket', QtWebSockets.QWebSocketServer.NonSecureMode)
          if self.server.listen(QtNetwork.QHostAddress.LocalHost, 1302):
              print('Connected: '+self.server.serverName()+' : '+self.server.serverAddress().toString()+':'+str(self.server.serverPort()))
          else:
              print('error')
          self.server.newConnection.connect(self.onNewConnection)
  
          print(self.server.isListening())
  
      def onNewConnection(self):
          print(self.sender())
          print("inside")
          self.server.textMessageReceived.connect(self.processTextMessage)
          self.server.binaryMessageReceived.connect(self.processBinaryMessage)
          self.server.disconnected.connect(self.socketDisconnected)
  
      def processTextMessage(self,  message):
          print(message)
  
      def processBinaryMessage(self,  message):
          print(message)
  
      def socketDisconnected(self):
          print('out')
  
  if __name__ == "__main__":
      import sys
      app = QtWidgets.QApplication(sys.argv)
      MyServer()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>when running isListening method, returns true, which leads me to believe that this code is  correct, however I try connect by a javascript client (html5 websocket) and it returns me a server connection error, the same happens when I try shoot the server by telnet (telnet localhost 1302).</p>