Skip to content

logo-sm

WebSocket Client Plugin for Corona Games and Apps

The WebSockets plugin provides a WebSocket client for your Corona projects with a simple to use API. Supports both secure and standard connections*.

*Supports the WebSocket protocol (RFC6455)

Get the Plugin

If you don't already have it, get the WebSockets plugin from the Corona Marketplace.

Enable the Plugin

Enable the plugin by adding the following entries to the plugins table of your projects build.settings file:

settings =
{
    plugins =
    {
      ["plugin.websockets"] = {
          publisherId = "com.develephant"
      },
      ["plugin.openssl"] = {
        publisherId = "com.coronalabs",
      },
      ["plugin.bit"] = {
        publisherId = "com.coronalabs",
      }
    },
}

Require the Plugin

In your code file make sure to require the plugin.

local WebSockets = require("plugin.websockets")

You're ready to start using WebSockets! Move on to the API section to learn more.