Tv Sockets Plugin

This plugin allows you to use WebSockets and form secure connections on tvOS using the SocketRocket Library

Platforms:

this plugin only works on tvOS

Functions:

tvSockets.connect(url, listener)

-- returns socket to obj to send and disconnect

url(string)-- url to connect to

listener(function)-- handles all event for socket

^event.type = "didReceiveMessageWithString" , "didCloseWithCode", "didFail", or "webSocketDidOpen"/event.isError (boolean)/ (type = "didReceiveMessageWithString") event.message(string)/ (type ="webSocketDidOpen")event.didOpen (boolean)/ (type = "didFail") event.error (string)

tvSockets.disconnect(socket)

-- closes the socket

socket(socket) the socket obj is returned in .connect

tvSockets.send(socket, data)

-- send string to socket

socket(socket) the socket obj is returned in .connect

data(string)

Build Settings:

Helpful Links:

Example

Support

Get Plugin