[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: "ratchet" socket control library
- From: David Manura <dm.lua@...>
- Date: Sat, 22 Oct 2011 19:22:38 -0400
On Wed, Sep 28, 2011 at 10:10 AM, Ian Good
> Wanted to introduce ratchet, a new library
One style point: The code [1] defines modules like
require "package"
local common = require "ratchet.http.common"
module("ratchet.http.server", package.seeall)
local class = getfenv()
__index = class
function new(socket, from, handlers, send_size)
local self = {}
setmetatable(self, class)
.....
end
I think you can replace getfenv() here with _M.
[1] https://github.com/icgood/ratchet/blob/master/src/http/server.lua