Python Forum
python socketio-client-2 and nod js socketio server communication is not success
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
Reply
#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.
Reply
#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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Paramiko Server -- Exception (server): Error reading SSH protocol banner ujlain 3 4,283 Jul-24-2023, 06:52 AM
Last Post: Gribouillis
  Client/Server proper finalizing transfer wolfman5874 1 1,423 Jul-04-2022, 07:35 PM
Last Post: wolfman5874
Bug Problem connecting TLS client written in C++ and Twisted server gpropf 0 1,361 Jun-12-2022, 05:57 PM
Last Post: gpropf
  Server/client basic communication ebolisa 0 2,009 Sep-30-2021, 12:22 PM
Last Post: ebolisa
  Client server Multithreading Anan 6 5,757 Apr-21-2021, 08:19 PM
Last Post: SheeppOSU
Question Trouble with Client/Server reverse Shell! Gilush 0 2,757 Feb-03-2021, 01:04 PM
Last Post: Gilush
  Basic client server code question swisscheese 4 3,192 Dec-12-2020, 08:51 AM
Last Post: Larz60+
  How can i create a server for already existing client using Python? Chapanson 21 7,323 Aug-19-2020, 09:12 AM
Last Post: DeaD_EyE
  Simple TCP Client and TCP Server Problem Vapulabis 5 4,336 Jul-12-2020, 05:09 PM
Last Post: ndc85430
  how to send an image from server to client using PICKLE module dafdaf 1 3,067 Jun-02-2020, 01:08 PM
Last Post: nuffink

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020