Joe_La_Bricole
Member
Hello,
I'm able to set a local peer to peer connection and a communication with a server.
My goal now is to make a peer to peer network.
Here is the protocol I apply.
I have :
- a server (socat) listening on UDP port_server.
- two identical gamemaker clients
The client :
- creates a UDP socket on port_A
- send an empty packet to the server
The server:
- waits to have the two clients' ip_A/port_A and ip_B/port_B
- sends back A to B and B to A
The clients send packets to each other, until they reach each other.
My question is :
1 - Is the above protocol correct ?
2 - Is it fine if both GM clients are on the same computer with the same IP (but different ports)
3 - should I use 1 socket to talk with the server then destroy it and create a new socket to communicate with the peer ?
Thanks for reading
I'm able to set a local peer to peer connection and a communication with a server.
My goal now is to make a peer to peer network.
Here is the protocol I apply.
I have :
- a server (socat) listening on UDP port_server.
- two identical gamemaker clients
The client :
- creates a UDP socket on port_A
- send an empty packet to the server
The server:
- waits to have the two clients' ip_A/port_A and ip_B/port_B
- sends back A to B and B to A
The clients send packets to each other, until they reach each other.
My question is :
1 - Is the above protocol correct ?
2 - Is it fine if both GM clients are on the same computer with the same IP (but different ports)
3 - should I use 1 socket to talk with the server then destroy it and create a new socket to communicate with the peer ?
Thanks for reading