lua-users home
lua-l archive

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



I don't think lua has a limit like that - more likely some problem assembling the buffer on the receive end before you load it into lua.

try dumping what you receive to disk as well before loading it into lua. Then you can see if you have any buffer accumulation issues etc

Adrien




Lucas Teixeira wrote:
> Sure it's a hack.  You could partition the file so that it doesn't
> change the meaning of anything and run loadstring on the chunks.  I'm
> not sure how you could figure out where to chop it though.

I thought about this solution.
But I guess it is a "buggy" solution. Doing this, probably, something will be wrong in the code and a lot of bugs will appear from nowhere. :D

But still being a solution anyway.

Thanks,

Lucas Teixeira

On 8/16/07, *Lucas Teixeira* <loteixeira@gmail.com <mailto:loteixeira@gmail.com>> wrote:

    > Could you write it to file and call luaL_dofile?

    > wes

    Actually I tryed this and a unhandled exception is thrown by the
    application.
    And one more time I have no idea what is causing this :)

    But if still not working I will try this solution.

    Lucas


    On 8/16/07, *Lucas Teixeira * <loteixeira@gmail.com
    <mailto:loteixeira@gmail.com>> wrote:

        The application loads the whole lua file. Then the application
        parses it.
        Actually this test that I am doing is reading a file from my
        own computer, I just have a adaptor class that simulates a
        network transfer and load a local file.

        The problem isnt network transfering, the test is reading a
        file from my computer, opening it using fopen storing all the
        content on a const char* buffer and passing it to lua.

        Lucas


        On 8/16/07, *Edwin Eyan Moragas* <haaktu@gmail.com
        <mailto:haaktu@gmail.com>> wrote:

            On 8/16/07, Rob Kendrick <lua-l@nun.org.uk
            <mailto:lua-l@nun.org.uk>> wrote:
            > Wesley Smith top-posted:
            > > Could you write it to file and call luaL_dofile?
            >
            > This strikes me as an inelegant hack, if the data's
            coming over the network.
            >
            > Does the Lua API support incremental parsing, such that
            you can keep
            > calling a function to pump more data in, and then signal
            the end?
            >


            parsing a lua lib file sounds like incremental parsing.

            why not send the source one file at a time then the
            calling code
            as the last?

            --
            no sig





--
Adrien de Croy - WinGate Proxy Server - http://www.wingate.com