TCP for transferring a string from node.js to photon

Hi! … is TCP the best option to transmit a char string from a node.js server to a Photon Device?

@fbt, how long is the string and how often will it be transmitted?

Hi @peekay123! … the string will be text command, so it won’t be too long, and it will not be transmitted too often … i was thinking about using sparkcloud and transfer the string as a parameter of a particle.function() from node.js …

@fbt, using a Particle.function() is super easy and you benefit from cloud encryption, etc. Using TCP does not give you that encryption (arriving soon) and requires you to do all the work of receiving, parsing, etc. With a single Particle.function() you can receive and parse commands and data from you node.js server. :wink: