This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
weaversam8's profile picture

Running a background listener.

Started by weaversam8, 30 January 2014 - 02:59 PM
weaversam8 #1
Posted 30 January 2014 - 03:59 PM
Hello everyone! I have basic lua knowledge, so, no need to be babied. I am writing a custom HTTP API for a server that does not have it enabled. I am not going into the details on how it works because it is proprietary. I need to have a program in the background listening for a file to appear. When it does so, I need to fire a custom event. Is this possible?
Lyqyd #2
Posted 30 January 2014 - 06:06 PM
Sure, just use os.queueEvent to add your custom event to the queue. I'm curious as to how you're going to get around the http API being disabled. I can't think of any way with just CC on a server to actually get web page data if it isn't enabled.