QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: loudar on July 10, 2019, 06:36:13 am

Title: Peer-to-peer connection
Post by: loudar on July 10, 2019, 06:36:13 am
I want to connect to a certain computer via _OPENCLIENT but it doesn't work with the IPv4 address (the one I get via cmd > ifconfig) of the server.
I used a random port, in this case 8080, equal on both host and client side.

Any ideas what could be wrong?
Title: Re: Peer-to-peer connection
Post by: FellippeHeitor on July 10, 2019, 07:26:09 am
Firewall?
Title: Re: Peer-to-peer connection
Post by: loudar on July 10, 2019, 10:29:22 am
Even if it was the firewall, I want it to work on any new computer the program is run on, is there a way to ensure it goes through the firewall within the code?
Title: Re: Peer-to-peer connection
Post by: TempodiBasic on July 10, 2019, 06:45:29 pm
IMHO
you must register by code your program like an exception of the firewall
see Mum Microsoft what says about this...https://support.microsoft.com/it-it/help/947709/how-to-use-the-netsh-advfirewall-firewall-context-instead-of-the-netsh (https://support.microsoft.com/it-it/help/947709/how-to-use-the-netsh-advfirewall-firewall-context-instead-of-the-netsh)

Title: Re: Peer-to-peer connection
Post by: loudar on July 16, 2019, 06:39:48 pm
How would I run such commands automatically via QB64? I could run the cmd.exe for sure, but I don't know how I would use the command remotely.

Any other way would be highly inconvenient, as I want to distribute the program rather widely and want to simplify the installation process as much as reducing it to a single .exe file. This, however, should download the contents for the actual program from a server; thus having to have the ability to already establish a peer-to-peer connection before downloading. If I can do that within the program 100% automated that would be perfect.