Hi,
For an web API I'd like to communicate with I have to use https / ssl. I figured out how to make a normal http request.
But a https would require luasec which I'm not sure of how I can get that into my game's distribution.
So my question:
* How to make a https reuqest with löve OR
* How to distribute an additional library like luasec with my game.
Make a https request
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 11
- Joined: Tue Nov 06, 2012 6:44 pm
- Location: Austria
- Contact:
Make a https request
I'm doing #onegameamonth | http://ananasblau.com/games | http://twitter.com/ananasblau
- substitute541
- Party member
- Posts: 484
- Joined: Fri Aug 24, 2012 9:04 am
- Location: Southern Leyte, Visayas, Philippines
- Contact:
Re: Make a https request
I'm... not sure if Love2D supports internet communication. It's a game engine anyways.
Currently designing themes for WordPress.
Sometimes lurks around the forum.
Sometimes lurks around the forum.
Re: Make a https request
LOVE comes with Luasocket included, check the wiki on how to use it. I would also recommend checking out the LUBE library for ease of use.
Luasocket supports http requests, but not https. There is no built in https support in LOVE sadly.
EDIT: I'm tired and should have read your post more closely. You already know all of this
Luasocket supports http requests, but not https. There is no built in https support in LOVE sadly.
EDIT: I'm tired and should have read your post more closely. You already know all of this

Re: Make a https request
As usual with luasecananasblau wrote:So my question:
* How to make a https reuqest with löve OR
You would need to distribute *.zip file containing:ananasblau wrote: * How to distribute an additional library like luasec with my game.
- your *.love game
- dynamically loaded libraries for each supported architecture, so ssl.dll for windows, ssl.so for linux, and ssl."I_dont_know_what" for OSX.
Then instruct your users to put those library files in such location, where they could be found by love's dynamic loader (so maybe current directory, or within LD_LIBRARY_PATH etc).
Those library files should be compiled with the same compiler and libraries as the original love binary, so in practice this is really hard to do (unless you make it only for yourself or your friends)
Another (better) way would be to include luasec as a library compiled into love binary, as is luasocket. But you would need to make patches to love sources, compile it for every supported platform and distribute it in place of original love.
Another solution (even better) would be to implement SSL in plain lua, but that would be a huge task.
Personally, I would use LUBE or luasocket with UDP packets, as UDP packets are non-blocking.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
-
- Prole
- Posts: 11
- Joined: Tue Nov 06, 2012 6:44 pm
- Location: Austria
- Contact:
Re: Make a https request
Thanks miko, compiling love was what i feared and I'm not keen on doing it as i haven't even got a windows machine to test. I guess I'll use a proxy to channel the game's http request to the https server.
I'm doing #onegameamonth | http://ananasblau.com/games | http://twitter.com/ananasblau
Who is online
Users browsing this forum: Google [Bot] and 5 guests