Send socket from python to Meteor (node.js)

I want to send a socket with data (a whole integer "23") from python to a web application that is written using Meteor which is a web structure built on top of node.js and other libraries.

On the python side, I have the following code:

import serial, socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("localhost", 3000)) s.send ('something') 

What do I need to do on the Meteor side? Is this Python code correct? Is this any different than websockets?

+4
source share
1 answer

Meteor uses the DDP protocol for communication, so you will need to write a DDP client for Python and either the CALL remote Meteor method or SUB for the published channel.

Some initial work on the python DDP client was done but not finished, here: https://github.com/meteor/meteor/blob/master/examples/unfinished/python-ddp-client/ddp-client.py

+3
source

All Articles