Comparison

net/server_event.lua @ 6853:a2cc477eb19b

server_event: Rename luaevent module variable to avoid name clash [luacheck]
author Kim Alvefur <zash@zash.se>
date Fri, 25 Sep 2015 17:21:00 +0200
parent 6852:626d8152b1ad
child 6854:d05bbf0bd620
comparison
equal deleted inserted replaced
6852:626d8152b1ad 6853:a2cc477eb19b
46 local coroutine_wrap = coroutine.wrap 46 local coroutine_wrap = coroutine.wrap
47 local coroutine_yield = coroutine.yield 47 local coroutine_yield = coroutine.yield
48 48
49 local has_luasec, ssl = pcall ( require , "ssl" ) 49 local has_luasec, ssl = pcall ( require , "ssl" )
50 local socket = require "socket" 50 local socket = require "socket"
51 local event = require "luaevent.core" 51 local levent = require "luaevent.core"
52 52
53 local socket_gettime = socket.gettime 53 local socket_gettime = socket.gettime
54 local getaddrinfo = socket.dns.getaddrinfo 54 local getaddrinfo = socket.dns.getaddrinfo
55 55
56 local log = require ("util.logger").init("socket") 56 local log = require ("util.logger").init("socket")
76 end 76 end
77 return z 77 return z
78 end 78 end
79 end )( ) 79 end )( )
80 80
81 local base = event.new( ) 81 local base = levent.new( )
82 local addevent = base.addevent 82 local addevent = base.addevent
83 local EV_READ = event.EV_READ 83 local EV_READ = levent.EV_READ
84 local EV_WRITE = event.EV_WRITE 84 local EV_WRITE = levent.EV_WRITE
85 local EV_TIMEOUT = event.EV_TIMEOUT 85 local EV_TIMEOUT = levent.EV_TIMEOUT
86 local EV_SIGNAL = event.EV_SIGNAL 86 local EV_SIGNAL = levent.EV_SIGNAL
87 87
88 local EV_READWRITE = bitor( EV_READ, EV_WRITE ) 88 local EV_READWRITE = bitor( EV_READ, EV_WRITE )
89 89
90 local interfacelist = { } 90 local interfacelist = { }
91 91
801 return { 801 return {
802 cfg = cfg, 802 cfg = cfg,
803 base = base, 803 base = base,
804 loop = loop, 804 loop = loop,
805 link = link, 805 link = link,
806 event = event, 806 event = levent,
807 event_base = base, 807 event_base = base,
808 addevent = newevent, 808 addevent = newevent,
809 addserver = addserver, 809 addserver = addserver,
810 addclient = addclient, 810 addclient = addclient,
811 wrapclient = wrapclient, 811 wrapclient = wrapclient,