Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 python socketio-client-2 and nod js socketio server communication is not success
#1
Hi guys,
I am trying to connect a node js socketio server using my python socketio-client. But it is not working now, because the node js socketio-serer version is changed that uses socket.io protocol 2.0 . It is a secure connection that uses ".cert" and ".key" files. The socketio client in python is already newest version which is socketIO-client-2 0.7.5 that is using socket.io protocol 1.x . I think that the connection is not made because the protocol mismatch. Please help me.

Thanks in advance! Smile
Quote
#2
.cert and .key is unrelated to socketio, those are files used for ssh connections.  So without seeing what you're doing now, such as a small snippet of code for how you're connecting, there's not a ton we can do to help.
Quote
#3
Hi nilamo,
I am sorry I didn't attach the code file. I added the code part for socketIO client below:

from socketIO_client import SocketIO




def on_connect():
    print ("Connected to server!!!")

def on_disconnect():
    print ("disconnected from server")

def on_reconnect():
    print ("reconnected to server")
    


if __name__ == '__main__':
    socketIO = SocketIO('https://cpnodestg.tiamd.com', cert=('certs/new_client.crt', 'certs/new_client.key'))
    #socketIO = SocketIO('http://192.168.1.250:2017')
    socketIO.on('connect', on_connect)
    socketIO.on('disconnect', on_disconnect)
    )
    socketIO.on('reconnect', on_reconnect)

    print "client created"
    socketIO.wait()
This code is working before updating the socketio version in the nodejs. But now the code is not displaying anything.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  simple udp server/client cardmaker 2 171 Nov-26-2019, 12:36 AM
Last Post: micseydel
  Slow websockets server -> client pattagghiu 0 203 Sep-17-2019, 09:28 AM
Last Post: pattagghiu
  Chat (Client-Server) andresdrr 3 390 Aug-26-2019, 02:01 PM
Last Post: ThomasL
  Python server(Django web site)/client(Python app) connection Junior_Pythoneer 5 418 Jul-05-2019, 05:41 PM
Last Post: noisefloor
  How to combine data taken from server between client and GUI? bescf 9 911 Apr-02-2019, 11:48 AM
Last Post: bescf
  recive post request from client(browser) python sockets kunz 1 723 Dec-13-2018, 12:53 AM
Last Post: kunz
  tcp server/client port connection issue valshev 2 2,175 Sep-01-2018, 02:50 PM
Last Post: valshev
  Send data BMP180 between client and server trought module socket smalhao 0 782 Jul-30-2018, 12:56 PM
Last Post: smalhao
  Sending/Receiving Multiple Message from Server or Client Lyperion 0 1,485 Jul-30-2018, 07:52 AM
Last Post: Lyperion
  Need help to make a server/client for DNS Eddie05 1 953 Jun-12-2018, 10:04 AM
Last Post: j.crater

Forum Jump:


Users browsing this thread: 1 Guest(s)