[Vortex] Anybody have binding of vortex into Lua?

Sam Roberts sroberts at uniserve.com
Wed Oct 4 23:07:42 CEST 2006


On Wed, Oct 04, 2006 at 12:22:26PM -0700, Sam Roberts wrote:

I just realized that even if you don't read lua, the v_table seems
to dissappear from my pseudo-lua example.

> A lua-ish interface would combine elements of LuaSocket (non-blocking
> i/o support) and the lua Expat wrappers (expat is sax-like, so the lua
> wrappers are callback based). Pseudo-lua usage would be:
> 
> v_table = {
> 	on_create = function (channel, ....)
> 	   do stuff...
> 	end,
> 	on_receive = function (channel, frame, ....)
> 	   print(frame:data())
> 	end,
> 	...
> }

The v_table that defines the callbacks would have to passed to one of
the layers... associated with the profile using vortex.new(), or
associated with the channel using vortex.connection_new().

> v = vortex.new(... profiles supported ...)
>
> v:set_up_various_stuff(...)
> 
> l = v.connection_new(host, port, ...)





More information about the Vortex mailing list