node.js - Not able to connect Python client with Nodejs server -
i trying connect python client nodejs server. python client showing error message.
this server program:
server.js
var app = require('express')() , server = require('http').createserver(app) , io = require('socket.io').listen(server); server.listen(3000); io.sockets.on('connection', function (socket) { console.log('connected'); });
here client program:
hub.py
from socketio_client import socketio socket = socketio('localhost', 3000)
when run hub.py shows following error:
traceback (most recent call last): file "hub.py", line 3, in <module> socketio('localhost', 8002, loggingnamespace) socketio: file "/usr/lib/python3/dist-packages/socketio_client/__init__.py", line 331, in __init__ resource, hurry_interval_in_seconds, **kw) file "/usr/lib/python3/dist-packages/socketio_client/__init__.py", line 51, in __init__ self._transport file "/usr/lib/python3/dist-packages/socketio_client/__init__.py", line 59, in _transport self._engineio_session = self._get_engineio_session() file "/usr/lib/python3/dist-packages/socketio_client/__init__.py", line 73, in _get_engineio_session transport.recv_packet()) stopiteration
Comments
Post a Comment