Well, I was able to expand the example a bit, and make a simple chat program.
I'm running client and server both on my same machine, or on two machines in my LAN, and it works fine. But of course I have my own "internal" IP address, which is useless for someone on the outside using this program to chat with me.
How do I get around the local IP table? I suppose this is more of a networking question than a luasocket / love question directly.
--Mr. Strange
LUBE (Networking Library)
-
- Party member
- Posts: 101
- Joined: Mon Aug 11, 2008 5:19 am
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library)
If I understand correctly you want to use a machine on your LAN for an 'internet' connection instead of local? In that case.. you might want to give up most routers filter out local connections. The best thing you can do is try tunneling via an external pc, but if you already have that.. well you can try from there.
BTW, I never thought that with the update and keypressed callbacks I have I could finally make myself a chat program that doesn't lock up waiting for the other. (as I tried to do it without löve a few times before, however I haven't found a timeout for normal command line I/O yet)
EDIT: Wait? You meant that internet clients see local clients by their local IP? In which case the above still applies. However I am (and was) tired while writing this edit (and the original), so if you don't mind to explain what you really meant.. (too tired to finish the sentence)
BTW, I never thought that with the update and keypressed callbacks I have I could finally make myself a chat program that doesn't lock up waiting for the other. (as I tried to do it without löve a few times before, however I haven't found a timeout for normal command line I/O yet)
EDIT: Wait? You meant that internet clients see local clients by their local IP? In which case the above still applies. However I am (and was) tired while writing this edit (and the original), so if you don't mind to explain what you really meant.. (too tired to finish the sentence)
-
- Party member
- Posts: 101
- Joined: Mon Aug 11, 2008 5:19 am
Re: LUBE (Networking Library)
I'm afraid you may be running pretty far afield from my original question - let me try to be very clear:
I use Mon's example, with some tweaks, to basically write a little chate application. I use ipconfig to discover my local (internal) IP address, hard-code that into the client script, and then run both scripts on a single (non-networked) machine. The work, and I can chat back and forth with myself!
I've also been able to chat between two machines on the same LAN - because they use the same local IP address lookup. My internal IP is 192.168.0.1, which is often a default internal address.
I want the program to work between any two machines, but I'm not sure how to properly connect. This might (hopefully) be a simple operation. Remember - I am not a networking expert - I just have Mon's example and my lua knowledge guiding me.
--Mr. Strange
I use Mon's example, with some tweaks, to basically write a little chate application. I use ipconfig to discover my local (internal) IP address, hard-code that into the client script, and then run both scripts on a single (non-networked) machine. The work, and I can chat back and forth with myself!
I've also been able to chat between two machines on the same LAN - because they use the same local IP address lookup. My internal IP is 192.168.0.1, which is often a default internal address.
I want the program to work between any two machines, but I'm not sure how to properly connect. This might (hopefully) be a simple operation. Remember - I am not a networking expert - I just have Mon's example and my lua knowledge guiding me.
--Mr. Strange
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library)
You have to open a port in your modem, link that to your internal IP, and use your external IP (get it from sites like http://whatismyip.com) when distributing. However, it probably might be best if you use a service as dyndns, so you can use hostnames. And most games profit from the client being able to choose the server from a list or enter it manually.
@self: Finally enable DNS, come on, just 2 lines or something.
@self: Finally enable DNS, come on, just 2 lines or something.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library)
Finally another update, oh and wait a version number....
...
...
0.01?
New:
...
...
0.01?
New:
- Fixed the send function in server
- Enabled DNS
- Fixed problem when loading external protocol
- Added first error-checking functions: server:send and client:connect
NOTE: I haven't used any standard for error-checking yet, server:send returns number of errors (in case of send-to-all), client:connect throws an error (yes, that blue screen, and no the LÖVE version of it not a BSOD).
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.01
0.01.1
Note to self: How far are you going to go with those version numbers?
Updates:
ERROR & VERSION CHECKING
Uploading... DONE
Note to self: How far are you going to go with those version numbers?
Updates:
ERROR & VERSION CHECKING
Uploading... DONE
Re: LUBE (Networking Library) v0.01.1
hey, version 0.0001 worked great!
here's the result
basically its 2 independent games that are linked together. if the character in the left game hits a flower the seeds fly out of the screen to spawn some power ups in the space shooter game (right).
don't worry, it will be much more crazy when it's done
just wanted to let you know that i appreciate lube, thanks bartbes!
here's the result
basically its 2 independent games that are linked together. if the character in the left game hits a flower the seeds fly out of the screen to spawn some power ups in the space shooter game (right).
don't worry, it will be much more crazy when it's done
just wanted to let you know that i appreciate lube, thanks bartbes!
Re: LUBE (Networking Library) v0.01.1
crazy is good
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.01.1
Celebrating the fact that somebody has finally had a good experience with something I created, as most things I create are more of the quick-and-dirty way.
btw, I like the idea of lubing 2 totally different games..
EDIT: fusing->lubing
And those graphics! I especially like the arrow..
btw, I like the idea of lubing 2 totally different games..
EDIT: fusing->lubing
And those graphics! I especially like the arrow..
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.01.1
Sorry for those who liked the ability to download the files seperately, I've replaced them with a zip.
However, this has one big advantage (and this is the reason why I've done it):
The ability to have more than 3 files.
So, now included, the documentation, well at least a basic start of it.
AND: Added it to the wiki, so everyone can edit it, however I will always distribute self-made/self-compiled versions in the download.
However, this has one big advantage (and this is the reason why I've done it):
The ability to have more than 3 files.
So, now included, the documentation, well at least a basic start of it.
AND: Added it to the wiki, so everyone can edit it, however I will always distribute self-made/self-compiled versions in the download.
Who is online
Users browsing this forum: Amazon [Bot] and 4 guests