PeerData Property (General questions)
According to the online help:
Optionally, you can add inside Arg3 some custom text you want to send to remote peer. Remote peer then can read data that was sent inside Search method using PeerData property.
During this part of the Search function is any Event fired at the Peer side at which time the peer can read the PeerData property?
I am attempting to implement a 1-N config where any number of clients can connect to the server, without the server necessarily knowing the ID of the clients. I can implement exactly what I need if I manually connect to do a Search on each side, but I'd like that to happen automatically - it would be an advantage
Re: PeerData Property
Hi,
wodVPN is peer to peer component. You can connect multiple peers from one side but for each connection with new peer you need to use new wodVPN instance.
So Arg3 will be sent to exact peer where you want to connect because one instance of wodVPN can connect to one peer.
If I maybe misunderstand you question can you maybe explain it little bit more?
Regards,
Drazen
Re: PeerData Property
Hi,
wodVPN is peer to peer component. You can connect multiple peers from one side but for each connection with new peer you need to use new wodVPN instance.So Arg3 will be sent to exact peer where you want to connect because one instance of wodVPN can connect to one peer.
Yes, I am creating one instance on the server for each client that it will connect to - which is working fine. As one client connects, the server will create another instance to listen for the next p2p connection.
My clients know what the server's ID is, so I can do a Search and the mediator will find and return the server's details to the client. From what I understand, before the SearchDone event is triggered with those details, it sends a packet to the server and it then needs to receive a packet from the server (this usually happens when Search is called from the server). Is there an event triggered on the server when that initial packet is sent? Ideally I would like a way that the server knows about a client connecting without building another mechanism/transport to handle that.
Re: PeerData Property
Hi,
There is no event raised for PeerData. PeerData is available once SearchDone event is triggered so you can retrieve it there.
By server in this case I believe you're referring to mediator. However, mediator doesn't interfere with any of the data exchanged not it should (it can't even read data since it's crypted).
Regards,
Damba
Re: PeerData Property
Hi,
Sorry ... Till now I couldn't find the answer for Arg3 usage from
your discussion, But I think you can do it this way:
1- Create your own Winsock Server on your vpn[instance]-server
Side, which must have a known IP,Port to your Client-Sides.
2- Create a Winsock Client on your VPN-peer Client Sides which
can connect to your Winsock Server.
3- your Winsock clients, after successful authentication with your,
Winsock Server, should grant Successful connection.
4- Then Winsock client should Send your vpn peer client credentials
to the Winsock server, which in turn provide it to your VPN
Server instance.
5- The same way Your Winsock Serve should Send your VPN -Server
credentials to your Winsock Client, to be provided in turn to
your VPN peer, then Connecting your VPN's becomes auto matic and
successful if credentials are exact at both sides.
I hope this Helps ... and do what you want it.
I hope I get the Arg3 usage or benefit ... how to be handled ?
Best Regards.