Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CLOUD coding protocal
Thumbs Up 
Lua source code edited on the cloud is transferred to the node and runned on the node.
The node communicates with server via TCP protocal(Server IP: [email protected]:7500)

Here is protocal:

1, Define your node's name  (such as "doitCar")

2, When a lua file is edited and needed to be downloaded at the node:
     2.1 Server sends [color=#ff9933]"__B__"[/color] to the node. the node open a file,and send [color=#ff9933]"cmd=next\r\n"[/color] to server as responce string. Once the node recievs "__B__", it should know that a new source code file is prepared to be transferred. 
     2.2 Server will send the source code in sevaral package. The node recieves and store the package one by one, and sends [color=#ff66ff]"cmd=next\r\n"[/color] to the server every package.
     2.3 Server send [color=#ff9933]"__E__"[/color] when the transfering is finished. The node recieves the finishing string, saves the source code, closes the opened file. compiles the file,and dofile it.

3, Send [color=#ff9933]"cmd=keep\r\n"[/color] every 3 minitus to keep the tcp link alive.

The CLOUD coding website:

A tutorial was posted at here:     that's really simple and easy.
Have fun!

A chinese protocal can be found here:

You can get the tutorial code at github:

Cool Angel Huh Idea Dodgy Tongue

Forum Jump:

Users browsing this thread: 1 Guest(s)