[ANNOUNCE]: LuaSocket 2.0.3 RC2

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[ANNOUNCE]: LuaSocket 2.0.3 RC2

Diego Nehab-3
Hi All,

The new candidate release for LuaSocket 2.0.3 is available
for download from

     http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/luasocket-2.0.3-rc2.zip

I plan to release the final version within the next couple
of weeks, so please take a look and see if you find any
issues you want fixed before then.

Kind regards,
Diego

Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Ignacio Burgueño
Diego Nehab wrote:
> Hi All,
>
> The new candidate release for LuaSocket 2.0.3 is available
> for download from
>
>    
> http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/luasocket-2.0.3-rc2.zip 
>


Does the NEW file inside describes what's new in this version or it
hasn't been updated yet?

Regards,
Ignacio


Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Petite Abeille
In reply to this post by Diego Nehab-3

On Nov 2, 2009, at 9:10 AM, Diego Nehab wrote:

> The new candidate release for LuaSocket 2.0.3 is available
> for download from
>
>    http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/luasocket-2.0.3-rc2.zip

Thanks :)

>
> I plan to release the final version within the next couple
> of weeks, so please take a look and see if you find any
> issues you want fixed before then.

Any specific area to look into?
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Diego Nehab-3
In reply to this post by Ignacio Burgueño
Hi,

> Does the NEW file inside describes what's new in this version or it hasn't
> been updated yet?

It's updated but I should probably have made it relative to
RC1 instead. Very few things changed since RC1. Here are the
new changes:

    * Fixed: receive() returns immediatelly if prefix can satisfy
      bytes requested (M Joonas Pihlaja);
    * Improved: Decent makefiles (LHF).
    * Fixed: manual sample of HTTP authentication now uses correct
      "authorization" header (Alexandre Ittner);

Regards,
Diego
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Diego Nehab-3
In reply to this post by Petite Abeille
Hi,

>> I plan to release the final version within the next couple
>> of weeks, so please take a look and see if you find any
>> issues you want fixed before then.
>
> Any specific area to look into?

Not really. :) But sometimes my "bug tracking system" may
fail. The only two outstanding issues I am considering are

     http://lua-users.org/lists/lua-l/2009-08/msg00342.html

and

     http://lua-users.org/lists/lua-l/2008-08/msg00446.html

so no need to remind me of them.

If there are other open issues I should to consider, please
let me know.

Kind regards,
Diego
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Joseph Stewart
Diego,

First pass at running a non-trivial program (cross-compiled, no less)
show this to pass the "smoke test".

As always, thanks for working on this!

-joe

On Mon, Nov 2, 2009 at 4:19 PM, Diego Nehab <[hidden email]> wrote:

> Hi,
>
>>> I plan to release the final version within the next couple
>>> of weeks, so please take a look and see if you find any
>>> issues you want fixed before then.
>>
>> Any specific area to look into?
>
> Not really. :) But sometimes my "bug tracking system" may
> fail. The only two outstanding issues I am considering are
>
>    http://lua-users.org/lists/lua-l/2009-08/msg00342.html
>
> and
>
>    http://lua-users.org/lists/lua-l/2008-08/msg00446.html
>
> so no need to remind me of them.
>
> If there are other open issues I should to consider, please
> let me know.
>
> Kind regards,
> Diego
>
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

云帆江
In reply to this post by Diego Nehab-3
Diego,
    hi, i think i need ssl suport while connect to xmpp server which has strict require on autheration

--
welcom to gtalk me
http://hi.baidu.com/jyf1987
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Pierre LeMoine
> Diego,
>     hi, i think i need ssl suport while connect to xmpp server which has
> strict require on autheration
http://luasec.luaforge.net/ might be what you'r looking for then?
/Pierre
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Tomás Guisasola-2
  Hi

On Tue, 3 Nov 2009, Pierre LeMoine wrote:
>> Diego,
>>     hi, i think i need ssl suport while connect to xmpp server which has
>> strict require on autheration
> http://luasec.luaforge.net/ might be what you'r looking for then?
> /Pierre
  You should take a look at the new version at:

http://www.inf.puc-rio.br/~brunoos/luasec/
http://www.inf.puc-rio.br/~brunoos/luasec/reference.html#request

  Version 0.4 now provides support for HTTPS through LuaSocket.
  Tomás
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Pierre LeMoine
>        You should take a look at the new version at:
>
> http://www.inf.puc-rio.br/~brunoos/luasec/
> http://www.inf.puc-rio.br/~brunoos/luasec/reference.html#request
>
>        Version 0.4 now provides support for HTTPS through LuaSocket.
>                Tomás
Hmm... What obvious reason is there for the luaforge-page not to be
updated/redirecting, that i am missing?
I, at least, find it confusing with old mirrors lying around on the internet.
/Pierre
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Ignacio Burgueño
In reply to this post by Diego Nehab-3
Diego Nehab wrote:

>
> If there are other open issues I should to consider, please
> let me know.

Maybe this? Is not an open issue per se, but a useful addition.

http://www.net-core.org/39/lua/patching-luasocket-to-make-it-compatible

http://www.net-core.org/dl/luasocket-2.0.2-acceptfd.patch

Regards,
Ignacio


Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Petite Abeille

On Nov 3, 2009, at 6:34 PM, Ignacio Burgueño wrote:

> Maybe this? Is not an open issue per se, but a useful addition.
>
> http://www.net-core.org/39/lua/patching-luasocket-to-make-it- 
> compatible
>
> http://www.net-core.org/dl/luasocket-2.0.2-acceptfd.patch

I would second that! Such addition would be very useful. Please,  
pretty please! :))

Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Joseph Stewart
In reply to this post by Ignacio Burgueño
All,

Maybe I don't understand the underlying problem the acceptfd patch
addresses, but if it's simply a matter of getting the file descriptor
from a luasocket object, then you can use the :getfd() function.

-joe

2009/11/3 Ignacio Burgueño <[hidden email]>:

> Diego Nehab wrote:
>
>>
>> If there are other open issues I should to consider, please
>> let me know.
>
> Maybe this? Is not an open issue per se, but a useful addition.
>
> http://www.net-core.org/39/lua/patching-luasocket-to-make-it-compatible
>
> http://www.net-core.org/dl/luasocket-2.0.2-acceptfd.patch
>
> Regards,
> Ignacio
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Alexander Gladysh
In reply to this post by Petite Abeille
>> Maybe this? Is not an open issue per se, but a useful addition.

>> http://www.net-core.org/39/lua/patching-luasocket-to-make-it-compatible

>> http://www.net-core.org/dl/luasocket-2.0.2-acceptfd.patch

> I would second that! Such addition would be very useful. Please, pretty
> please! :))

Me too :-)

(Sorry, can't resist.)

Alexander.
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Bruno Silvestre-2
In reply to this post by Pierre LeMoine
On Tue, Nov 3, 2009 at 3:07 PM, Pierre LeMoine <[hidden email]> wrote:
> Hmm... What obvious reason is there for the luaforge-page not to be
> updated/redirecting, that i am missing?

FTP  is not working (at least for me) and Google forgot the mirror. :-/

--
bruno
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Petite Abeille
In reply to this post by Joseph Stewart

On Nov 3, 2009, at 8:48 PM, Joseph Stewart wrote:

> Maybe I don't understand the underlying problem the acceptfd patch
> addresses, but if it's simply a matter of getting the file descriptor
> from a luasocket object, then you can use the :getfd() function.

That, and build a socket out of a fd, e.g. socket.tcp( fd ). Once a  
socket can be express solely in term of a fd, serializing it become  
trivial :))

Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Ignacio Burgueño
In reply to this post by Joseph Stewart
Joseph Stewart wrote:
> All,
>
> Maybe I don't understand the underlying problem the acceptfd patch
> addresses, but if it's simply a matter of getting the file descriptor
> from a luasocket object, then you can use the :getfd() function.
>

Quoting from:
http://www.net-core.org/39/lua/patching-luasocket-to-make-it-compatible

"It adds a new method “acceptfd” which works just like “accept” but
instead of returning a socket object it returns  the underlying “file
descriptor” (a number). A new optional parameter to “socket.tcp()”
allows to create a socket object from a file descriptor."

So you could accept connections in a given Lua state and process it in a
different one. Be it by means of using Lanes, LuaProc, or whatever suits
you.

Regards,
Ignacio


Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Pierre LeMoine
In reply to this post by Ignacio Burgueño
> Maybe this? Is not an open issue per se, but a useful addition.
>
> http://www.net-core.org/39/lua/patching-luasocket-to-make-it-compatible
>
> http://www.net-core.org/dl/luasocket-2.0.2-acceptfd.patch
+1
/Pierre
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Sam Roberts
In reply to this post by Ignacio Burgueño
2009/11/3 Ignacio Burgueño <[hidden email]>:

> Joseph Stewart wrote:
>> Maybe I don't understand the underlying problem the acceptfd patch
>> addresses, but if it's simply a matter of getting the file descriptor
>> from a luasocket object, then you can use the :getfd() function.
>>
>
> Quoting from:
> http://www.net-core.org/39/lua/patching-luasocket-to-make-it-compatible
>
> "It adds a new method “acceptfd” which works just like “accept” but instead
> of returning a socket object it returns  the underlying “file descriptor” (a
> number). A new optional parameter to “socket.tcp()” allows to create a
> socket object from a file descriptor."
>
> So you could accept connections in a given Lua state and process it in a
> different one. Be it by means of using Lanes, LuaProc, or whatever suits
> you.

The above doesn't answer the OP's question of how

fd = ssock:acceptfd()

is different from

fd = ssock:accept():getfd()

It might be that the problem is that the accepted userdata will close
the underlying fd in it's __gc().

If true, acceptfd() might be better replaced with a method of
relinquishing ownership.


I totally support the idea of being able to work with fds in the
luasocket API, particularly so tcp-like userdata can be created from
fds. I would use this for serial devices, for example, which are much
more like sockets than they are like files, so lua's stdio-based io
library works quite poorly with them, despite being able to do
io.open"/dev/ttyWhatever"

Cheers,
Sam
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2

Diego Nehab-3
Hi,

I agree getfd and setfd are not greatly thought out
features. That's why I call them hacks and that's why they
are not part of the documented API. They are there just for
debugging purposes and for people who want to use them at
their own risk.

The problem is that these functions can lead to confusion on
Windows, since socket objects are not file descriptors
Having them in the API would seem to indicate it is ok to
obtain a file descriptor from a file handle and then insert
them in a socket object. This would not work on Windows and
I don't like the idea of having this on the API.

Now, if what we are talking about functionality that allows
you to obtain this OS-dependent socket handle/descriptor and
create another LuaSocket object from it, we can discuss what
is the best API for it. It is a valid scenario that I had
not foreseen, and I'd be happy to add it to the library.

But this is not a bug, which is what I am looking for right
now.

Regards,
Diego
12