Am Montag, 23. Dezember 2013 19:17:34 UTC+1 schrieb Sergey Lyubka:
>
> On Mon, Dec 23, 2013 at 6:07 PM, Stefan Reich <
> [email protected] <javascript:>> wrote:
>
>> > You're asking about HTTP client, the answer is yes it does exist for
>> both C (mg_download) and Lua (you need to call connect() and then use the
>> socket to fetch the data).
>>
>> In Lua, how can I access socket functions? Wouldn't I need something like
>> LuaSocket? I don't see a connect function in Mongoose's current Lua
>> enviornment...
>>
>
> connect() is in 4.1 release, it is absent in the current head.
>
Hmm... is it coming back? I have a modified mongoose.c anyway... maybe I'll
try to paste the code for "connect" into my mongoose.c.
Because that:
>
> local ok, sock = pcall(connect, "google.com", 80, 0)
> if ok then
> sock:send('GET / HTTP/1.0\r\n\r\n')
> local reply = sock:recv()
> sock:close()
> end
>
>>
>> is exactly what I want :)
> ? I don't get what you mean there. But it's not so important I think.
>>
>
> If it is not so important, I'd better shut up :-)
>
:-)
--
You received this message because you are subscribed to the Google Groups
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/groups/opt_out.