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
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 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 protocol 1.x . I think that the connection is not made because the protocol mismatch. Please help me.

Thanks in advance! Smile
.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.
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('', cert=('certs/new_client.crt', 'certs/new_client.key'))
    #socketIO = SocketIO('')
    socketIO.on('connect', on_connect)
    socketIO.on('disconnect', on_disconnect)
    socketIO.on('reconnect', on_reconnect)

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

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Python script multi client server sonra 1 102 Mar-24-2020, 03:49 PM
Last Post: Larz60+
  Python 3 Serial communication need help jegatheesans 0 94 Mar-16-2020, 05:37 AM
Last Post: jegatheesans
  simple udp server/client cardmaker 2 427 Nov-26-2019, 12:36 AM
Last Post: micseydel
  Slow websockets server -> client pattagghiu 0 342 Sep-17-2019, 09:28 AM
Last Post: pattagghiu
  Chat (Client-Server) andresdrr 3 708 Aug-26-2019, 02:01 PM
Last Post: ThomasL
  Python server(Django web site)/client(Python app) connection Junior_Pythoneer 5 584 Jul-05-2019, 05:41 PM
Last Post: noisefloor
  How to combine data taken from server between client and GUI? bescf 9 1,366 Apr-02-2019, 11:48 AM
Last Post: bescf
  recive post request from client(browser) python sockets kunz 1 839 Dec-13-2018, 12:53 AM
Last Post: kunz
  tcp server/client port connection issue valshev 2 2,473 Sep-01-2018, 02:50 PM
Last Post: valshev
  Send data BMP180 between client and server trought module socket smalhao 0 889 Jul-30-2018, 12:56 PM
Last Post: smalhao

Forum Jump:

Users browsing this thread: 1 Guest(s)