Skip to content

Instantly share code, notes, and snippets.

@kn666
kn666 / tarantool-websockets.lua
Created April 15, 2018 14:08 — forked from daurnimator/tarantool-websockets.lua
Tarantool + lua-http websockets nonblocking
#!/usr/bin/env tarantool
local cqueues = require "cqueues"
local fiber = require "fiber"
local socket = require "socket"
package.loaded["http.client"] = nil -- tarantool has a namespace clash
local websocket = require "http.websocket"
local cq = cqueues.new()
-- Hook up cqueues loop inside tarantool fiber