0

Good people,

I am looking to write a rails 5 app that will receive a TCP data stream from an external party.

Is it possible to receive TCP data using ActionCable? Are there sample apps online? Google hasn't been helpful Or will I need to use eventmachine to receive the TCP data?

rlandster
  • 7,294
  • 14
  • 58
  • 96
anthonyms
  • 950
  • 1
  • 10
  • 20

1 Answers1

1

My answer might not be much helpful.

  1. Actioncable forces its own protocol which is undocumented but simple.
  2. Websocket isn't exactly a simple tcp socket since it uses its own protocol for framing.

So for raw tcp socket you could use eventmachine however it has several issues. For example no true ssl support although that might not be an issue if you are running in a server environment. Also you don't have much control of what is going on. Depending on how many connections you have you could use simple TCPServer socket or something more advanced based on nio4r eg: celluloid-io etc.

GorillaApe
  • 3,611
  • 10
  • 63
  • 106