eLua net module

classic Classic list List threaded Threaded
12 messages Options
Téo Benjamin Téo Benjamin
Reply | Threaded
Open this post in threaded view
|

eLua net module

Hi,
I think we have found a bug in the eLua net module.

We were trying to use the net module to send messages to a local server here from a LM3S board.

The problem is: when we call  net.socket( net.SOCK_STREAM ), it works fine, giving us the socket 0. The second time we do it (after calling net.close( socket ), the function returns the socket 1 as the next avaiable socket. After that, it returns 2, 3 ... At some point, it return -1, because there are, supposedly, any free sockets left.

After a lot of tests here, I think the function net.close( socket ) is not working fine. It seems to close the connection (apparently), but it don't free the socket.

Is there a bug in the eLua module or we just missunderstood the implementation?

Any guess?

Thanks,
Téo

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Bittencourt Bittencourt
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

I think that's the way it works
net.close closes the connection of a socket, but the socket itself is still there. You may create a new connection on the same socket after closing another.

something like:

local sock = net.socket(0)
err  = net.connect(sock,ip,port)
...do something (send stuff for exemple)
net.close(sock)

now to connect with other host, do something like:

net.connect(sock,anotherIp,anotherPort)
...do something
net.close(sock)

with the same socket

--Pedro Bittencourt


On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]> wrote:
Hi,
I think we have found a bug in the eLua net module.

We were trying to use the net module to send messages to a local server here from a LM3S board.

The problem is: when we call  net.socket( net.SOCK_STREAM ), it works fine, giving us the socket 0. The second time we do it (after calling net.close( socket ), the function returns the socket 1 as the next avaiable socket. After that, it returns 2, 3 ... At some point, it return -1, because there are, supposedly, any free sockets left.

After a lot of tests here, I think the function net.close( socket ) is not working fine. It seems to close the connection (apparently), but it don't free the socket.

Is there a bug in the eLua module or we just missunderstood the implementation?

Any guess?

Thanks,
Téo

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Téo Benjamin Téo Benjamin
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

I've done that, but it did not work. The function net.send didn't send nothing at all.
I really think I have to close the socket and use another one (in this case, it would be the same, but coming from another call of net.socket)

On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt <[hidden email]> wrote:
I think that's the way it works
net.close closes the connection of a socket, but the socket itself is still there. You may create a new connection on the same socket after closing another.

something like:

local sock = net.socket(0)
err  = net.connect(sock,ip,port)
...do something (send stuff for exemple)
net.close(sock)

now to connect with other host, do something like:

net.connect(sock,anotherIp,anotherPort)
...do something
net.close(sock)

with the same socket

--Pedro Bittencourt


On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]> wrote:
Hi,
I think we have found a bug in the eLua net module.

We were trying to use the net module to send messages to a local server here from a LM3S board.

The problem is: when we call  net.socket( net.SOCK_STREAM ), it works fine, giving us the socket 0. The second time we do it (after calling net.close( socket ), the function returns the socket 1 as the next avaiable socket. After that, it returns 2, 3 ... At some point, it return -1, because there are, supposedly, any free sockets left.

After a lot of tests here, I think the function net.close( socket ) is not working fine. It seems to close the connection (apparently), but it don't free the socket.

Is there a bug in the eLua module or we just missunderstood the implementation?

Any guess?

Thanks,
Téo

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Téo Benjamin Téo Benjamin
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

Can someone have a look at this?
I really couldn't find a good way to make it work.

Thanks

On Fri, Feb 12, 2010 at 4:45 PM, Téo Benjamin <[hidden email]> wrote:
I've done that, but it did not work. The function net.send didn't send nothing at all.
I really think I have to close the socket and use another one (in this case, it would be the same, but coming from another call of net.socket)


On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt <[hidden email]> wrote:
I think that's the way it works
net.close closes the connection of a socket, but the socket itself is still there. You may create a new connection on the same socket after closing another.

something like:

local sock = net.socket(0)
err  = net.connect(sock,ip,port)
...do something (send stuff for exemple)
net.close(sock)

now to connect with other host, do something like:

net.connect(sock,anotherIp,anotherPort)
...do something
net.close(sock)

with the same socket

--Pedro Bittencourt


On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]> wrote:
Hi,
I think we have found a bug in the eLua net module.

We were trying to use the net module to send messages to a local server here from a LM3S board.

The problem is: when we call  net.socket( net.SOCK_STREAM ), it works fine, giving us the socket 0. The second time we do it (after calling net.close( socket ), the function returns the socket 1 as the next avaiable socket. After that, it returns 2, 3 ... At some point, it return -1, because there are, supposedly, any free sockets left.

After a lot of tests here, I think the function net.close( socket ) is not working fine. It seems to close the connection (apparently), but it don't free the socket.

Is there a bug in the eLua module or we just missunderstood the implementation?

Any guess?

Thanks,
Téo

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev




_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

I haven't worked much with the net module, but it looks like it should
be recycling socket numbers as they are closed, since the socket
function needs to reserve the socket before connect can use it.

Do you get errors from any of the functions that can return error states?

Though I haven't noticed any obvious problems in a quick glance over
the code, it sounds like there might be some sort of disconnect in
terms of flagging sockets as having been closed, and the socket
function in checking for a closed/free one.

Are the used and closed socket numbers ever available again at later
times (perhaps after uip has had some time to iterate through the main
loops a few times?)

On Mon, Feb 22, 2010 at 10:20 AM, Téo Benjamin <[hidden email]> wrote:

> Can someone have a look at this?
> I really couldn't find a good way to make it work.
>
> Thanks
>
> On Fri, Feb 12, 2010 at 4:45 PM, Téo Benjamin <[hidden email]>
> wrote:
>>
>> I've done that, but it did not work. The function net.send didn't send
>> nothing at all.
>> I really think I have to close the socket and use another one (in this
>> case, it would be the same, but coming from another call of net.socket)
>>
>> On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt
>> <[hidden email]> wrote:
>>>
>>> I think that's the way it works
>>> net.close closes the connection of a socket, but the socket itself is
>>> still there. You may create a new connection on the same socket after
>>> closing another.
>>>
>>> something like:
>>>
>>>> local sock = net.socket(0)
>>>> err  = net.connect(sock,ip,port)
>>>> ...do something (send stuff for exemple)
>>>> net.close(sock)
>>>
>>> now to connect with other host, do something like:
>>>
>>>> net.connect(sock,anotherIp,anotherPort)
>>>> ...do something
>>>> net.close(sock)
>>>
>>> with the same socket
>>>
>>> --Pedro Bittencourt
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]>
>>> wrote:
>>>>
>>>> Hi,
>>>> I think we have found a bug in the eLua net module.
>>>>
>>>> We were trying to use the net module to send messages to a local server
>>>> here from a LM3S board.
>>>>
>>>> The problem is: when we call  net.socket( net.SOCK_STREAM ), it works
>>>> fine, giving us the socket 0. The second time we do it (after calling
>>>> net.close( socket ), the function returns the socket 1 as the next avaiable
>>>> socket. After that, it returns 2, 3 ... At some point, it return -1, because
>>>> there are, supposedly, any free sockets left.
>>>>
>>>> After a lot of tests here, I think the function net.close( socket ) is
>>>> not working fine. It seems to close the connection (apparently), but it
>>>> don't free the socket.
>>>>
>>>> Is there a bug in the eLua module or we just missunderstood the
>>>> implementation?
>>>>
>>>> Any guess?
>>>>
>>>> Thanks,
>>>> Téo
>>>>
>>>> _______________________________________________
>>>> eLua-dev mailing list
>>>> [hidden email]
>>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> eLua-dev mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>
>>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

Hi,

I'll be taking a look at that soon, probably tomorrow. I know there's a problem in the code, I'm just not sure what's the best way to fix it.

Best,
Bogdan

On Mon, Feb 22, 2010 at 8:40 PM, James Snyder <[hidden email]> wrote:
I haven't worked much with the net module, but it looks like it should
be recycling socket numbers as they are closed, since the socket
function needs to reserve the socket before connect can use it.

Do you get errors from any of the functions that can return error states?

Though I haven't noticed any obvious problems in a quick glance over
the code, it sounds like there might be some sort of disconnect in
terms of flagging sockets as having been closed, and the socket
function in checking for a closed/free one.

Are the used and closed socket numbers ever available again at later
times (perhaps after uip has had some time to iterate through the main
loops a few times?)

On Mon, Feb 22, 2010 at 10:20 AM, Téo Benjamin <[hidden email]> wrote:
> Can someone have a look at this?
> I really couldn't find a good way to make it work.
>
> Thanks
>
> On Fri, Feb 12, 2010 at 4:45 PM, Téo Benjamin <[hidden email]>
> wrote:
>>
>> I've done that, but it did not work. The function net.send didn't send
>> nothing at all.
>> I really think I have to close the socket and use another one (in this
>> case, it would be the same, but coming from another call of net.socket)
>>
>> On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt
>> <[hidden email]> wrote:
>>>
>>> I think that's the way it works
>>> net.close closes the connection of a socket, but the socket itself is
>>> still there. You may create a new connection on the same socket after
>>> closing another.
>>>
>>> something like:
>>>
>>>> local sock = net.socket(0)
>>>> err  = net.connect(sock,ip,port)
>>>> ...do something (send stuff for exemple)
>>>> net.close(sock)
>>>
>>> now to connect with other host, do something like:
>>>
>>>> net.connect(sock,anotherIp,anotherPort)
>>>> ...do something
>>>> net.close(sock)
>>>
>>> with the same socket
>>>
>>> --Pedro Bittencourt
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]>
>>> wrote:
>>>>
>>>> Hi,
>>>> I think we have found a bug in the eLua net module.
>>>>
>>>> We were trying to use the net module to send messages to a local server
>>>> here from a LM3S board.
>>>>
>>>> The problem is: when we call  net.socket( net.SOCK_STREAM ), it works
>>>> fine, giving us the socket 0. The second time we do it (after calling
>>>> net.close( socket ), the function returns the socket 1 as the next avaiable
>>>> socket. After that, it returns 2, 3 ... At some point, it return -1, because
>>>> there are, supposedly, any free sockets left.
>>>>
>>>> After a lot of tests here, I think the function net.close( socket ) is
>>>> not working fine. It seems to close the connection (apparently), but it
>>>> don't free the socket.
>>>>
>>>> Is there a bug in the eLua module or we just missunderstood the
>>>> implementation?
>>>>
>>>> Any guess?
>>>>
>>>> Thanks,
>>>> Téo
>>>>
>>>> _______________________________________________
>>>> eLua-dev mailing list
>>>> [hidden email]
>>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> eLua-dev mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>
>>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Téo Benjamin Téo Benjamin
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

In reply to this post by jbsnyder


On Mon, Feb 22, 2010 at 3:40 PM, James Snyder <[hidden email]> wrote:
I haven't worked much with the net module, but it looks like it should
be recycling socket numbers as they are closed, since the socket
function needs to reserve the socket before connect can use it.

Do you get errors from any of the functions that can return error states?

If I use the function net.socket(...) once to get the socket and use the same socket number in function connect (as Pedro has suggested), I get an error from the function send after the second connection (the first one works just fine, as I expected). It is error 2, actually, but it's not pretty clear what it might be.
 
Though I haven't noticed any obvious problems in a quick glance over
the code, it sounds like there might be some sort of disconnect in
terms of flagging sockets as having been closed, and the socket
function in checking for a closed/free one.
I think the close function is working fine to close the socket. It just doesn't set the socket as available again.
 

Are the used and closed socket numbers ever available again at later
times (perhaps after uip has had some time to iterate through the main
loops a few times?)

No. At least for 10 or 15 seconds, they do not appear available again.
 
On Mon, Feb 22, 2010 at 10:20 AM, Téo Benjamin <[hidden email]> wrote:
> Can someone have a look at this?
> I really couldn't find a good way to make it work.
>
> Thanks
>
> On Fri, Feb 12, 2010 at 4:45 PM, Téo Benjamin <[hidden email]>
> wrote:
>>
>> I've done that, but it did not work. The function net.send didn't send
>> nothing at all.
>> I really think I have to close the socket and use another one (in this
>> case, it would be the same, but coming from another call of net.socket)
>>
>> On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt
>> <[hidden email]> wrote:
>>>
>>> I think that's the way it works
>>> net.close closes the connection of a socket, but the socket itself is
>>> still there. You may create a new connection on the same socket after
>>> closing another.
>>>
>>> something like:
>>>
>>>> local sock = net.socket(0)
>>>> err  = net.connect(sock,ip,port)
>>>> ...do something (send stuff for exemple)
>>>> net.close(sock)
>>>
>>> now to connect with other host, do something like:
>>>
>>>> net.connect(sock,anotherIp,anotherPort)
>>>> ...do something
>>>> net.close(sock)
>>>
>>> with the same socket
>>>
>>> --Pedro Bittencourt
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]>
>>> wrote:
>>>>
>>>> Hi,
>>>> I think we have found a bug in the eLua net module.
>>>>
>>>> We were trying to use the net module to send messages to a local server
>>>> here from a LM3S board.
>>>>
>>>> The problem is: when we call  net.socket( net.SOCK_STREAM ), it works
>>>> fine, giving us the socket 0. The second time we do it (after calling
>>>> net.close( socket ), the function returns the socket 1 as the next avaiable
>>>> socket. After that, it returns 2, 3 ... At some point, it return -1, because
>>>> there are, supposedly, any free sockets left.
>>>>
>>>> After a lot of tests here, I think the function net.close( socket ) is
>>>> not working fine. It seems to close the connection (apparently), but it
>>>> don't free the socket.
>>>>
>>>> Is there a bug in the eLua module or we just missunderstood the
>>>> implementation?
>>>>
>>>> Any guess?
>>>>
>>>> Thanks,
>>>> Téo
>>>>
>>>> _______________________________________________
>>>> eLua-dev mailing list
>>>> [hidden email]
>>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> eLua-dev mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>
>>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

I checked in a tentative fix for this bug, please let me know if it works (I can't check it now).

Best,
Bogdan

On Mon, Feb 22, 2010 at 9:00 PM, Téo Benjamin <[hidden email]> wrote:


On Mon, Feb 22, 2010 at 3:40 PM, James Snyder <[hidden email]> wrote:
I haven't worked much with the net module, but it looks like it should
be recycling socket numbers as they are closed, since the socket
function needs to reserve the socket before connect can use it.

Do you get errors from any of the functions that can return error states?

If I use the function net.socket(...) once to get the socket and use the same socket number in function connect (as Pedro has suggested), I get an error from the function send after the second connection (the first one works just fine, as I expected). It is error 2, actually, but it's not pretty clear what it might be.
 
Though I haven't noticed any obvious problems in a quick glance over
the code, it sounds like there might be some sort of disconnect in
terms of flagging sockets as having been closed, and the socket
function in checking for a closed/free one.
I think the close function is working fine to close the socket. It just doesn't set the socket as available again.
 

Are the used and closed socket numbers ever available again at later
times (perhaps after uip has had some time to iterate through the main
loops a few times?)

No. At least for 10 or 15 seconds, they do not appear available again.
 
On Mon, Feb 22, 2010 at 10:20 AM, Téo Benjamin <[hidden email]> wrote:
> Can someone have a look at this?
> I really couldn't find a good way to make it work.
>
> Thanks
>
> On Fri, Feb 12, 2010 at 4:45 PM, Téo Benjamin <[hidden email]>
> wrote:
>>
>> I've done that, but it did not work. The function net.send didn't send
>> nothing at all.
>> I really think I have to close the socket and use another one (in this
>> case, it would be the same, but coming from another call of net.socket)
>>
>> On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt
>> <[hidden email]> wrote:
>>>
>>> I think that's the way it works
>>> net.close closes the connection of a socket, but the socket itself is
>>> still there. You may create a new connection on the same socket after
>>> closing another.
>>>
>>> something like:
>>>
>>>> local sock = net.socket(0)
>>>> err  = net.connect(sock,ip,port)
>>>> ...do something (send stuff for exemple)
>>>> net.close(sock)
>>>
>>> now to connect with other host, do something like:
>>>
>>>> net.connect(sock,anotherIp,anotherPort)
>>>> ...do something
>>>> net.close(sock)
>>>
>>> with the same socket
>>>
>>> --Pedro Bittencourt
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]>
>>> wrote:
>>>>
>>>> Hi,
>>>> I think we have found a bug in the eLua net module.
>>>>
>>>> We were trying to use the net module to send messages to a local server
>>>> here from a LM3S board.
>>>>
>>>> The problem is: when we call  net.socket( net.SOCK_STREAM ), it works
>>>> fine, giving us the socket 0. The second time we do it (after calling
>>>> net.close( socket ), the function returns the socket 1 as the next avaiable
>>>> socket. After that, it returns 2, 3 ... At some point, it return -1, because
>>>> there are, supposedly, any free sockets left.
>>>>
>>>> After a lot of tests here, I think the function net.close( socket ) is
>>>> not working fine. It seems to close the connection (apparently), but it
>>>> don't free the socket.
>>>>
>>>> Is there a bug in the eLua module or we just missunderstood the
>>>> implementation?
>>>>
>>>> Any guess?
>>>>
>>>> Thanks,
>>>> Téo
>>>>
>>>> _______________________________________________
>>>> eLua-dev mailing list
>>>> [hidden email]
>>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> eLua-dev mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>
>>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

Sorry, I reversed the fix, as I realized it couldn't possibly work. I really don't know what's the problem there, but I'm quite sure it will take a while to fix, unforunately. It seems that I have to take a closer look at the uIP code.

Best,
Bogdan

On Tue, Feb 23, 2010 at 1:12 PM, Bogdan Marinescu <[hidden email]> wrote:
I checked in a tentative fix for this bug, please let me know if it works (I can't check it now).

Best,
Bogdan


On Mon, Feb 22, 2010 at 9:00 PM, Téo Benjamin <[hidden email]> wrote:


On Mon, Feb 22, 2010 at 3:40 PM, James Snyder <[hidden email]> wrote:
I haven't worked much with the net module, but it looks like it should
be recycling socket numbers as they are closed, since the socket
function needs to reserve the socket before connect can use it.

Do you get errors from any of the functions that can return error states?

If I use the function net.socket(...) once to get the socket and use the same socket number in function connect (as Pedro has suggested), I get an error from the function send after the second connection (the first one works just fine, as I expected). It is error 2, actually, but it's not pretty clear what it might be.
 
Though I haven't noticed any obvious problems in a quick glance over
the code, it sounds like there might be some sort of disconnect in
terms of flagging sockets as having been closed, and the socket
function in checking for a closed/free one.
I think the close function is working fine to close the socket. It just doesn't set the socket as available again.
 

Are the used and closed socket numbers ever available again at later
times (perhaps after uip has had some time to iterate through the main
loops a few times?)

No. At least for 10 or 15 seconds, they do not appear available again.
 
On Mon, Feb 22, 2010 at 10:20 AM, Téo Benjamin <[hidden email]> wrote:
> Can someone have a look at this?
> I really couldn't find a good way to make it work.
>
> Thanks
>
> On Fri, Feb 12, 2010 at 4:45 PM, Téo Benjamin <[hidden email]>
> wrote:
>>
>> I've done that, but it did not work. The function net.send didn't send
>> nothing at all.
>> I really think I have to close the socket and use another one (in this
>> case, it would be the same, but coming from another call of net.socket)
>>
>> On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt
>> <[hidden email]> wrote:
>>>
>>> I think that's the way it works
>>> net.close closes the connection of a socket, but the socket itself is
>>> still there. You may create a new connection on the same socket after
>>> closing another.
>>>
>>> something like:
>>>
>>>> local sock = net.socket(0)
>>>> err  = net.connect(sock,ip,port)
>>>> ...do something (send stuff for exemple)
>>>> net.close(sock)
>>>
>>> now to connect with other host, do something like:
>>>
>>>> net.connect(sock,anotherIp,anotherPort)
>>>> ...do something
>>>> net.close(sock)
>>>
>>> with the same socket
>>>
>>> --Pedro Bittencourt
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]>
>>> wrote:
>>>>
>>>> Hi,
>>>> I think we have found a bug in the eLua net module.
>>>>
>>>> We were trying to use the net module to send messages to a local server
>>>> here from a LM3S board.
>>>>
>>>> The problem is: when we call  net.socket( net.SOCK_STREAM ), it works
>>>> fine, giving us the socket 0. The second time we do it (after calling
>>>> net.close( socket ), the function returns the socket 1 as the next avaiable
>>>> socket. After that, it returns 2, 3 ... At some point, it return -1, because
>>>> there are, supposedly, any free sockets left.
>>>>
>>>> After a lot of tests here, I think the function net.close( socket ) is
>>>> not working fine. It seems to close the connection (apparently), but it
>>>> don't free the socket.
>>>>
>>>> Is there a bug in the eLua module or we just missunderstood the
>>>> implementation?
>>>>
>>>> Any guess?
>>>>
>>>> Thanks,
>>>> Téo
>>>>
>>>> _______________________________________________
>>>> eLua-dev mailing list
>>>> [hidden email]
>>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> eLua-dev mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>
>>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev




_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Téo Benjamin Téo Benjamin
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

Hello all,

I have some news about the net problem we were having here.

As I told you before, I could't use the module for a simple application here. I have to send( repeatedly ) a request to a web server, over and over and over.

I had some problems here, but we were able to make it work in a, at least, strange way.

First of all, function net.send returns -1 sometimes (I think it happens when there is some problem with the connection). I don't know what it means, because it's not in the doc. I do not have a clue.

Function net.close return -1 sometimes.
It happens when the socket is closed. If I call this function once (after net.socket and net.connect), it returns 0 (ok) and it's not possible for me to send anything, for example. But if I call it again, it returns -1.
That's why I think the close function is actually closing the connection, but it doesn't free the socket to be used later.
So, I can't ask for a new socket (because all the fun would end after the 4 existing sockets), but I can't use the same socket either.
If I ask for a socket (net.socket( net.SOCK_STREAM )), I can connect and send. It works fine.
The net.close function returns 0 (ok). If I use the net.connect again (using the same socket number as before), the function doesn't return any error, but the send function simply doesn't do anything. I locks somewhere, somehow.

Now, how we made it work:

while true do
  sock = net.socket( net.SOCK_STREAM )
  net.connect( sock, host, port )  -- it returns 0
  net.send( sock, req )                -- it return 0
  response, err_recv = net.recv( sock, "*l" )
    if err_recv ~= 0 then
      print( "Error receiving response: "..err_recv )
      print( "Response = ", response )
    else
      print( "Response = ", response )
    end
end

The function net.recv usually returns error 2. In the doc, it seems to be net.err_CLOSE.
As we get this error, the next time the loop is executed again, I receive the same socket to use. Free as in freedom!
I'm not sure yet how or why it works. But it does!

I even think (not 100% sure here) that sometimes (very few), the net.recv function does not return an error, and I can read the message "HTTP/1.1 200 OK". In this case, the socket does not come avaiable for the next use!
As I said, it is very rare, so I'm using it for a while withot any errors.

If anyone can give us any kind of help, it would be very useful.
We are using this for a very important project here and I have to figure out a better, more efficient and solid way to use the net module.

Thanks sorry for the long, long, long message.
Téo

On Tue, Feb 23, 2010 at 8:20 AM, Bogdan Marinescu <[hidden email]> wrote:
Sorry, I reversed the fix, as I realized it couldn't possibly work. I really don't know what's the problem there, but I'm quite sure it will take a while to fix, unforunately. It seems that I have to take a closer look at the uIP code.

Best,
Bogdan


On Tue, Feb 23, 2010 at 1:12 PM, Bogdan Marinescu <[hidden email]> wrote:
I checked in a tentative fix for this bug, please let me know if it works (I can't check it now).

Best,
Bogdan


On Mon, Feb 22, 2010 at 9:00 PM, Téo Benjamin <[hidden email]> wrote:


On Mon, Feb 22, 2010 at 3:40 PM, James Snyder <[hidden email]> wrote:
I haven't worked much with the net module, but it looks like it should
be recycling socket numbers as they are closed, since the socket
function needs to reserve the socket before connect can use it.

Do you get errors from any of the functions that can return error states?

If I use the function net.socket(...) once to get the socket and use the same socket number in function connect (as Pedro has suggested), I get an error from the function send after the second connection (the first one works just fine, as I expected). It is error 2, actually, but it's not pretty clear what it might be.
 
Though I haven't noticed any obvious problems in a quick glance over
the code, it sounds like there might be some sort of disconnect in
terms of flagging sockets as having been closed, and the socket
function in checking for a closed/free one.
I think the close function is working fine to close the socket. It just doesn't set the socket as available again.
 

Are the used and closed socket numbers ever available again at later
times (perhaps after uip has had some time to iterate through the main
loops a few times?)

No. At least for 10 or 15 seconds, they do not appear available again.
 
On Mon, Feb 22, 2010 at 10:20 AM, Téo Benjamin <[hidden email]> wrote:
> Can someone have a look at this?
> I really couldn't find a good way to make it work.
>
> Thanks
>
> On Fri, Feb 12, 2010 at 4:45 PM, Téo Benjamin <[hidden email]>
> wrote:
>>
>> I've done that, but it did not work. The function net.send didn't send
>> nothing at all.
>> I really think I have to close the socket and use another one (in this
>> case, it would be the same, but coming from another call of net.socket)
>>
>> On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt
>> <[hidden email]> wrote:
>>>
>>> I think that's the way it works
>>> net.close closes the connection of a socket, but the socket itself is
>>> still there. You may create a new connection on the same socket after
>>> closing another.
>>>
>>> something like:
>>>
>>>> local sock = net.socket(0)
>>>> err  = net.connect(sock,ip,port)
>>>> ...do something (send stuff for exemple)
>>>> net.close(sock)
>>>
>>> now to connect with other host, do something like:
>>>
>>>> net.connect(sock,anotherIp,anotherPort)
>>>> ...do something
>>>> net.close(sock)
>>>
>>> with the same socket
>>>
>>> --Pedro Bittencourt
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]>
>>> wrote:
>>>>
>>>> Hi,
>>>> I think we have found a bug in the eLua net module.
>>>>
>>>> We were trying to use the net module to send messages to a local server
>>>> here from a LM3S board.
>>>>
>>>> The problem is: when we call  net.socket( net.SOCK_STREAM ), it works
>>>> fine, giving us the socket 0. The second time we do it (after calling
>>>> net.close( socket ), the function returns the socket 1 as the next avaiable
>>>> socket. After that, it returns 2, 3 ... At some point, it return -1, because
>>>> there are, supposedly, any free sockets left.
>>>>
>>>> After a lot of tests here, I think the function net.close( socket ) is
>>>> not working fine. It seems to close the connection (apparently), but it
>>>> don't free the socket.
>>>>
>>>> Is there a bug in the eLua module or we just missunderstood the
>>>> implementation?
>>>>
>>>> Any guess?
>>>>
>>>> Thanks,
>>>> Téo
>>>>
>>>> _______________________________________________
>>>> eLua-dev mailing list
>>>> [hidden email]
>>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> eLua-dev mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>
>>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev




_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Bittencourt Bittencourt
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

I believe you can check error codes on uIP doc. =)

And consider using an external TCP/IP interface chip, may be more stable (Considering this bizarre behavior of the uIP stack).

--Pedro Bittencourt


On Fri, Mar 5, 2010 at 3:51 PM, Téo Benjamin <[hidden email]> wrote:
Hello all,

I have some news about the net problem we were having here.

As I told you before, I could't use the module for a simple application here. I have to send( repeatedly ) a request to a web server, over and over and over.

I had some problems here, but we were able to make it work in a, at least, strange way.

First of all, function net.send returns -1 sometimes (I think it happens when there is some problem with the connection). I don't know what it means, because it's not in the doc. I do not have a clue.

Function net.close return -1 sometimes.
It happens when the socket is closed. If I call this function once (after net.socket and net.connect), it returns 0 (ok) and it's not possible for me to send anything, for example. But if I call it again, it returns -1.
That's why I think the close function is actually closing the connection, but it doesn't free the socket to be used later.
So, I can't ask for a new socket (because all the fun would end after the 4 existing sockets), but I can't use the same socket either.
If I ask for a socket (net.socket( net.SOCK_STREAM )), I can connect and send. It works fine.
The net.close function returns 0 (ok). If I use the net.connect again (using the same socket number as before), the function doesn't return any error, but the send function simply doesn't do anything. I locks somewhere, somehow.

Now, how we made it work:

while true do
  sock = net.socket( net.SOCK_STREAM )
  net.connect( sock, host, port )  -- it returns 0
  net.send( sock, req )                -- it return 0
  response, err_recv = net.recv( sock, "*l" )
    if err_recv ~= 0 then
      print( "Error receiving response: "..err_recv )
      print( "Response = ", response )
    else
      print( "Response = ", response )
    end
end

The function net.recv usually returns error 2. In the doc, it seems to be net.err_CLOSE.
As we get this error, the next time the loop is executed again, I receive the same socket to use. Free as in freedom!
I'm not sure yet how or why it works. But it does!

I even think (not 100% sure here) that sometimes (very few), the net.recv function does not return an error, and I can read the message "HTTP/1.1 200 OK". In this case, the socket does not come avaiable for the next use!
As I said, it is very rare, so I'm using it for a while withot any errors.

If anyone can give us any kind of help, it would be very useful.
We are using this for a very important project here and I have to figure out a better, more efficient and solid way to use the net module.

Thanks sorry for the long, long, long message.
Téo


On Tue, Feb 23, 2010 at 8:20 AM, Bogdan Marinescu <[hidden email]> wrote:
Sorry, I reversed the fix, as I realized it couldn't possibly work. I really don't know what's the problem there, but I'm quite sure it will take a while to fix, unforunately. It seems that I have to take a closer look at the uIP code.

Best,
Bogdan


On Tue, Feb 23, 2010 at 1:12 PM, Bogdan Marinescu <[hidden email]> wrote:
I checked in a tentative fix for this bug, please let me know if it works (I can't check it now).

Best,
Bogdan


On Mon, Feb 22, 2010 at 9:00 PM, Téo Benjamin <[hidden email]> wrote:


On Mon, Feb 22, 2010 at 3:40 PM, James Snyder <[hidden email]> wrote:
I haven't worked much with the net module, but it looks like it should
be recycling socket numbers as they are closed, since the socket
function needs to reserve the socket before connect can use it.

Do you get errors from any of the functions that can return error states?

If I use the function net.socket(...) once to get the socket and use the same socket number in function connect (as Pedro has suggested), I get an error from the function send after the second connection (the first one works just fine, as I expected). It is error 2, actually, but it's not pretty clear what it might be.
 
Though I haven't noticed any obvious problems in a quick glance over
the code, it sounds like there might be some sort of disconnect in
terms of flagging sockets as having been closed, and the socket
function in checking for a closed/free one.
I think the close function is working fine to close the socket. It just doesn't set the socket as available again.
 

Are the used and closed socket numbers ever available again at later
times (perhaps after uip has had some time to iterate through the main
loops a few times?)

No. At least for 10 or 15 seconds, they do not appear available again.
 
On Mon, Feb 22, 2010 at 10:20 AM, Téo Benjamin <[hidden email]> wrote:
> Can someone have a look at this?
> I really couldn't find a good way to make it work.
>
> Thanks
>
> On Fri, Feb 12, 2010 at 4:45 PM, Téo Benjamin <[hidden email]>
> wrote:
>>
>> I've done that, but it did not work. The function net.send didn't send
>> nothing at all.
>> I really think I have to close the socket and use another one (in this
>> case, it would be the same, but coming from another call of net.socket)
>>
>> On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt
>> <[hidden email]> wrote:
>>>
>>> I think that's the way it works
>>> net.close closes the connection of a socket, but the socket itself is
>>> still there. You may create a new connection on the same socket after
>>> closing another.
>>>
>>> something like:
>>>
>>>> local sock = net.socket(0)
>>>> err  = net.connect(sock,ip,port)
>>>> ...do something (send stuff for exemple)
>>>> net.close(sock)
>>>
>>> now to connect with other host, do something like:
>>>
>>>> net.connect(sock,anotherIp,anotherPort)
>>>> ...do something
>>>> net.close(sock)
>>>
>>> with the same socket
>>>
>>> --Pedro Bittencourt
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]>
>>> wrote:
>>>>
>>>> Hi,
>>>> I think we have found a bug in the eLua net module.
>>>>
>>>> We were trying to use the net module to send messages to a local server
>>>> here from a LM3S board.
>>>>
>>>> The problem is: when we call  net.socket( net.SOCK_STREAM ), it works
>>>> fine, giving us the socket 0. The second time we do it (after calling
>>>> net.close( socket ), the function returns the socket 1 as the next avaiable
>>>> socket. After that, it returns 2, 3 ... At some point, it return -1, because
>>>> there are, supposedly, any free sockets left.
>>>>
>>>> After a lot of tests here, I think the function net.close( socket ) is
>>>> not working fine. It seems to close the connection (apparently), but it
>>>> don't free the socket.
>>>>
>>>> Is there a bug in the eLua module or we just missunderstood the
>>>> implementation?
>>>>
>>>> Any guess?
>>>>
>>>> Thanks,
>>>> Téo
>>>>
>>>> _______________________________________________
>>>> eLua-dev mailing list
>>>> [hidden email]
>>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> eLua-dev mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>
>>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev




_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: eLua net module

Unfortunately, you are right. uIP isn't exactly the best TCP/IP stack out there, and eLua's layer over uIP isn't that great either. We probably need a complete rewrite in this area, I just don't havea good alternative right now. lwIP is quite large for our regular targets, and I read many complaints about it. Maybe the solution would be a better eLua layer over uIP.
And by the way, generally speaking -1 is an error indication in eLua, at least in the net module. Sorry for not documenting this.

Best,
Bogdan

On Fri, Mar 5, 2010 at 9:08 PM, Pedro Bittencourt <[hidden email]> wrote:
I believe you can check error codes on uIP doc. =)

And consider using an external TCP/IP interface chip, may be more stable (Considering this bizarre behavior of the uIP stack).

--Pedro Bittencourt



On Fri, Mar 5, 2010 at 3:51 PM, Téo Benjamin <[hidden email]> wrote:
Hello all,

I have some news about the net problem we were having here.

As I told you before, I could't use the module for a simple application here. I have to send( repeatedly ) a request to a web server, over and over and over.

I had some problems here, but we were able to make it work in a, at least, strange way.

First of all, function net.send returns -1 sometimes (I think it happens when there is some problem with the connection). I don't know what it means, because it's not in the doc. I do not have a clue.

Function net.close return -1 sometimes.
It happens when the socket is closed. If I call this function once (after net.socket and net.connect), it returns 0 (ok) and it's not possible for me to send anything, for example. But if I call it again, it returns -1.
That's why I think the close function is actually closing the connection, but it doesn't free the socket to be used later.
So, I can't ask for a new socket (because all the fun would end after the 4 existing sockets), but I can't use the same socket either.
If I ask for a socket (net.socket( net.SOCK_STREAM )), I can connect and send. It works fine.
The net.close function returns 0 (ok). If I use the net.connect again (using the same socket number as before), the function doesn't return any error, but the send function simply doesn't do anything. I locks somewhere, somehow.

Now, how we made it work:

while true do
  sock = net.socket( net.SOCK_STREAM )
  net.connect( sock, host, port )  -- it returns 0
  net.send( sock, req )                -- it return 0
  response, err_recv = net.recv( sock, "*l" )
    if err_recv ~= 0 then
      print( "Error receiving response: "..err_recv )
      print( "Response = ", response )
    else
      print( "Response = ", response )
    end
end

The function net.recv usually returns error 2. In the doc, it seems to be net.err_CLOSE.
As we get this error, the next time the loop is executed again, I receive the same socket to use. Free as in freedom!
I'm not sure yet how or why it works. But it does!

I even think (not 100% sure here) that sometimes (very few), the net.recv function does not return an error, and I can read the message "HTTP/1.1 200 OK". In this case, the socket does not come avaiable for the next use!
As I said, it is very rare, so I'm using it for a while withot any errors.

If anyone can give us any kind of help, it would be very useful.
We are using this for a very important project here and I have to figure out a better, more efficient and solid way to use the net module.

Thanks sorry for the long, long, long message.
Téo


On Tue, Feb 23, 2010 at 8:20 AM, Bogdan Marinescu <[hidden email]> wrote:
Sorry, I reversed the fix, as I realized it couldn't possibly work. I really don't know what's the problem there, but I'm quite sure it will take a while to fix, unforunately. It seems that I have to take a closer look at the uIP code.

Best,
Bogdan


On Tue, Feb 23, 2010 at 1:12 PM, Bogdan Marinescu <[hidden email]> wrote:
I checked in a tentative fix for this bug, please let me know if it works (I can't check it now).

Best,
Bogdan


On Mon, Feb 22, 2010 at 9:00 PM, Téo Benjamin <[hidden email]> wrote:


On Mon, Feb 22, 2010 at 3:40 PM, James Snyder <[hidden email]> wrote:
I haven't worked much with the net module, but it looks like it should
be recycling socket numbers as they are closed, since the socket
function needs to reserve the socket before connect can use it.

Do you get errors from any of the functions that can return error states?

If I use the function net.socket(...) once to get the socket and use the same socket number in function connect (as Pedro has suggested), I get an error from the function send after the second connection (the first one works just fine, as I expected). It is error 2, actually, but it's not pretty clear what it might be.
 
Though I haven't noticed any obvious problems in a quick glance over
the code, it sounds like there might be some sort of disconnect in
terms of flagging sockets as having been closed, and the socket
function in checking for a closed/free one.
I think the close function is working fine to close the socket. It just doesn't set the socket as available again.
 

Are the used and closed socket numbers ever available again at later
times (perhaps after uip has had some time to iterate through the main
loops a few times?)

No. At least for 10 or 15 seconds, they do not appear available again.
 
On Mon, Feb 22, 2010 at 10:20 AM, Téo Benjamin <[hidden email]> wrote:
> Can someone have a look at this?
> I really couldn't find a good way to make it work.
>
> Thanks
>
> On Fri, Feb 12, 2010 at 4:45 PM, Téo Benjamin <[hidden email]>
> wrote:
>>
>> I've done that, but it did not work. The function net.send didn't send
>> nothing at all.
>> I really think I have to close the socket and use another one (in this
>> case, it would be the same, but coming from another call of net.socket)
>>
>> On Fri, Feb 12, 2010 at 5:08 PM, Pedro Bittencourt
>> <[hidden email]> wrote:
>>>
>>> I think that's the way it works
>>> net.close closes the connection of a socket, but the socket itself is
>>> still there. You may create a new connection on the same socket after
>>> closing another.
>>>
>>> something like:
>>>
>>>> local sock = net.socket(0)
>>>> err  = net.connect(sock,ip,port)
>>>> ...do something (send stuff for exemple)
>>>> net.close(sock)
>>>
>>> now to connect with other host, do something like:
>>>
>>>> net.connect(sock,anotherIp,anotherPort)
>>>> ...do something
>>>> net.close(sock)
>>>
>>> with the same socket
>>>
>>> --Pedro Bittencourt
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:42 PM, Téo Benjamin <[hidden email]>
>>> wrote:
>>>>
>>>> Hi,
>>>> I think we have found a bug in the eLua net module.
>>>>
>>>> We were trying to use the net module to send messages to a local server
>>>> here from a LM3S board.
>>>>
>>>> The problem is: when we call  net.socket( net.SOCK_STREAM ), it works
>>>> fine, giving us the socket 0. The second time we do it (after calling
>>>> net.close( socket ), the function returns the socket 1 as the next avaiable
>>>> socket. After that, it returns 2, 3 ... At some point, it return -1, because
>>>> there are, supposedly, any free sockets left.
>>>>
>>>> After a lot of tests here, I think the function net.close( socket ) is
>>>> not working fine. It seems to close the connection (apparently), but it
>>>> don't free the socket.
>>>>
>>>> Is there a bug in the eLua module or we just missunderstood the
>>>> implementation?
>>>>
>>>> Any guess?
>>>>
>>>> Thanks,
>>>> Téo
>>>>
>>>> _______________________________________________
>>>> eLua-dev mailing list
>>>> [hidden email]
>>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> eLua-dev mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>>
>>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev




_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev