Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
byteoflogic

Standard ports for remote lua consoles

Recommended Posts

I think this is what this forum is for?

 

I don't really have any authority on this, but thought it would make sense if everyone used the same ports for this sort of functionality.

 

I would suggest using, say, port 10 (doesn't really matter) for all messages containing lua to execute, and putting said lua in the last part of the packet: (modem.broadcast(10, "username", "password", "gpu.set(0, 0, \"Hello World\")"))

 

Why is this useful? I can now have a single drone that works with many different programs with no real configuration. I can download programs via oppm, or paste them in from the internet, and they will always use the same port to access said functionality.

Link to post
Share on other sites

My understanding is that this forum is mostly for putting proposed standards and whatnot but it should be fine for fleshing out ideas for standards.

The problem with this approach of course is you're basically sending a password in the clear. But having a standard protocol + port would be nice.

I'd personally do away with the username+password scheme and instead just check if the sender is on a list of authorised IDs.

Having session logic should not be necessary as if something needs to be returned over the modem, it should be embedded into the code to run.

At this point you'd probably want to flesh out a standard API. Probably this:

* remexec.auth_add(component_id)

* remexec.auth_del(component_id)

The calls themselves should be self-explanatory.

Namespaces that should be included already:

* component

* computer

* remexec

Would something like that work?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.