lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I'm working on using libevnet (a server library that uses libevent)
for a proxy project for who I'm working for...  I'm not sure if they
want to release it as a public library or not...

However, libevnet provides many facilities for async work...
 Sockets, SSL, DNS, Threads are all exposed in such a way that
callbacks are used to notify completion.  So.. for example, you want
to look up the address of something.. you can call into the DNS system
and it will call into your function when your results are in.
If you want to connect to a destination using an address that is
resolved... you setup a socket to connect to a destination that uses a
named address.. and it will resolve it for you and connect you... when
its 'done' your callback will be called.

It uses an event loop (the libevent-based one for the most part) that
you can use directly (and also be able to add timer-based callbacks if
needed)  or integrate in such a way like this: <pseudocode>

while true do
 libevnet.step()
 -- Your stepping function
end

http://www.25thandclement.com/~william/projects/libevnet.html


On 9/3/06, Diego Nehab <diego@tecgraf.puc-rio.br> wrote:
Hi,

> The source I have(I think 2.0.1) has unix.c commented
> out.

Uncomment it in, if you want.

> I want to learn lua and write dnscat(tunnel through
> DNS protocol) in lua. Since DNS is a request/response
> thing, the client need constant polling to allow the
> server side to send things and a blocking read on the
> client side does won't work.

Can't you do polling with LuaSocket?

Regards,
Diego.



--
Thomas Harning Jr.