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

Search the Community

Showing results for tags 'ipc'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Minecraft


GitHub


IRC


Location


Interests

Found 1 result

  1. This is a draft. The library, and an example of compatible software will be coded later. OIPCL or OIPC Any OIPCL-compatible software MUST use the core OIPCL library and MAY use auxiliary IPC libraries. Concepts Open Inter-Process Communication Library (OIPCL): The library which provides a wrapper for the IPC sockets. Socket: A file on the system which links two programs' communications. OC: Abbreviation for "OpenComputers" OS: Abbreviation for "Operating System" OpenOS: The stock OS for OC computers. Host: The program which is being linked to by a client. Client: The program linking to a host. Rationale Due to the limitations of OpenOS, modifications would have to be made to many parts of the code to allow IPC within the core of OpenOS. To standardize any possible IPC libraries, a specification has been made. Background programs (or daemons) can be started with a simple wrapper, such as this example code: thread.create(function() shell.execute(ENV, "/bin/daemon.lua") end) Host programs will be notified by an event, "oipcl_link_attempt", when a process is attempting to link to it. Host programs can use the OIPCL's function to link to the process attempting to link to it. Client programs can use the OIPCL's function to link to a background process which will automatically handle opening a socket and notifying the host. Socket Format A socket file is a Lua file which is processed by the host and the client through the OIPCL. It is a table containing a list of tables. The internal tables contain a string, "from", being either the host's specified name, or the client's specified name. They also contain a table, "messages", containing a list of strings. This allows a program to serialize any object into a message. For example: { { from = "client name", messages = {"EXEC", "/bin/script.lua"} }, { from = "host name", messages = {"EXIT", "0"} } } Socket Naming The socket files are be stored in /lib/oipcl along with the library file. They are named in this format: oipcl-socket.[client name].[host name].lua Socket Library The OIPCL has 2 functions. function linkToHost(clientName: string, hostName: string) -- will return a buffer that is a wrapper to the socket file function linkToClient(clientName: string) -- will return a buffer that is a wrapper to the socket file Signals oipcl_link_attempt(clientName: string, hostName: string)
×
×
  • Create New...

Important Information

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