Restored from previous forum. Originally posted by waffle.
hey paul, do you have any ideas on connecting to chat programs together (client/server) when both are protected?
i know, thats a tuff one. For me even more complicated because one computer is connected via lan while the other is internet only.
my current method is to connect to a seperate server and let it host the chat, this can work, but is slower when there are many users, ad file transfers and so on.... just a quick question with a not so quick answer
i know its not easy, because ICQ can't do it either.
Restored from previous forum. Originally posted by TheBeck.
Maybe you could just make the server tell all the clients how to find each other and then the clients could talk to each other directly.
eg:
1) Client contacts chat server and requests #chat room and authorization
2) Server authorizes client
3) Server sends client list of IP address and port numbers for all other clients in #room
4) Server sends IP and port for new connecting client to all existing clients in #room
5) All clients can now talk as if on peer to peer network
6) Disconnecting clients inform server and server sends signal to all other clients
7) Server pings connected client list every so often to make sure client is still active
Notes:
All messages will have to be sent to each receiving client from sending client separately. I don't think this is a big deal because 1) text messages are so small in size generally. 2) this makes sending private messages from one client to one client easy and more secure (not even the server knows about privet messages).
All file transfers will go directly from client to client without taking ANY server resources at all.
Restored from previous forum. Originally posted by TheBeck.
If you have the type of firewall where it lets traffic from a certain IP address through after you have sent a packet to that address then you could do as I said above. Only have the server send the newly entered room client's IP to all other clients. All clients could then send a dummy packet to the new client. The new client could send dummy packets to all clients in room thus opening the firewalls. This is only an untested theory.
Restored from previous forum. Originally posted by waffle.
that was what i was doing when the problem cropped up...
i used the getlocalisp function in PB and passed that to the server to relay to other clients. The clients can connect to the server, but when they use the provided ISP they cannot connect to each other. I think this is because most firewalls use a local ISP and an internet ISP to monitor traffic. That way the local ISP when passed out cannot connect to the real ISP, and if the real ISP is passed out, that does not connect directly to the computer, but to the firewall.
for now though, i will just route all raffic throught the master server. Since the game i'm working on is turn based, its not time critical.
how would i send a dummy packet when the opennetworkconection call fails to connect to the local server ISP ? The local server also cannot send data to other clients directly either... not connected.
this topic could get complicated and make us look like hackers trying to circumvent client protections. But my thinking is that i have permition from the client to "hack" if my software is operated on a computer, Because i could do just as much harm using a master server computer to relay data as i could using peer to peer, where each computer is both a client and a server. i know its not easy, because many software titles will not work behind a firewall.
Restored from previous forum. Originally posted by TheBeck.
You are not hacking, you are just taking advantage of undocumented features.
I don't think anything in pure basic is going to let you just send a packet without trying connect to the computer you are tying to reach. I think you are going to have to make a windows API call using a protocol such as UDP. (http://www.webopedia.com/TERM/U/UDP.html) If you are making a game you are going to want to use this, or a like protocol anyway due to it's supper low latency. UDP can send a packet without expecting a reply an thus it won't "fail." Just get each client to send a UDP packet to ALL other clients and you should be good to go, without any hacking. Well this is my theory anyway.
Restored from previous forum. Originally posted by Berikco.
If one computer is behind a Router/firewall with NAT (native Address Translation), this computer can make the direct connection.
If two computers are behind a NAT, the receiver must have the port forwarded to the internal private IP of the PC.
No direct connection possible without forwarding Ports if both behind NAT, would have to go over a 3de server to do this.
Just like Chat/DCC
Restored from previous forum. Originally posted by waffle.
thanks for the effort tho
its at least good to know why something does not work.
so to make something like this work would probable require an "end-user" to custom configure a firewall to "permit" my program to work.
thats just way too complex for most users. I'll just use a designated server to handle program message traffic.
Restored from previous forum. Originally posted by Berikco.
Yep, users must configure router, or server must handle traffic.
Ed*nkey and kaza* do it this way. In Ed*nkey, you get another ID number if you're behind firewall.