VPN Multiple connection (General questions)
Hello,
I am implementing the VPN server-client approach. i need to establish the multiple connections with remote peers. i can achieve this with multiple wodvpn instances. but the problem is i am not aware of number of remote clients to be connected. Remote clients can be of any numbers and i need to connect all the remote clients with server at the same time. I need help for these, how can i make wodvpn instances dynamically and when to start them listening.
Looking forward to response.
Regards,
Nisha.
Re: VPN Multiple connection
Hi Nisha,
I believe we discussed this on over our ticketing system already. Why don't you try running Mediator in your application?
Once some client tries to search for Server , UserConnected event will be raised with client's information. In that case, simply invoke a function (which you will pass client's info to) and start new wodVPN instance which will connect the peers.
Regards,
Damba
Re: VPN Multiple connection
Hello,
Thanks for replying.
As i understood, userconnected event would be fired while user connects to channel how can we start new instance and connect peers over there.
Regards,
Nisha
Re: VPN Multiple connection
Nisha,
Nope, UserConnected will be fired when user connects to Mediator. You will then be provided with user's IP, and port from which he is coming. Please check the following link on mediator info:
http://www.weonlydo.com/VPN/Help/Mediator.html
Simply implement a new procedure, something like:
--------------------------------------------------------
Private Sub LoadNewVPN(Hostname as string, Port as Integer) 'include any other needed parameters
'now initiate an instance
Dim wodVPN2 as wodVPNCom
Set wodVPN2 = new wodVPNCom
wodVPN2.HostName = Hostname
wodVPN2.Port = Port
wodVPN2.Connect
End Sub
--------------------------------------------------------
Please note that this is just a sample, and isn't a complete solution.
Regards,
Damba
Re: VPN Multiple connection
Hello,
Thanks for response.
As i have observed when user connects to Mediator.. then MediatorConnected event is getting fired and it is having user's IP and port too..so just to confirm and make sure, Are talking for userconnected or mediatorconnected event?
And i have tried to create new instance in mediatorconnected event too as you said below in loadNewVPN..connection can be established even but then if we try to connect another user then mediatorconnected event is not getting fired for another user.
Please let me know your comments/views for this above.
Regards,
Nisha
Nisha,
Nope, UserConnected will be fired when user connects to Mediator. You will then be provided with user's IP, and port from which he is coming. Please check the following link on mediator info:
http://www.weonlydo.com/VPN/Help/Mediator.html
Simply implement a new procedure, something like:
--------------------------------------------------------
Private Sub LoadNewVPN(Hostname as string, Port as Integer) 'include any other needed parameters
'now initiate an instance
Dim wodVPN2 as wodVPNCom
Set wodVPN2 = new wodVPNCom
wodVPN2.HostName = Hostname
wodVPN2.Port = Port
wodVPN2.Connect
End Sub
--------------------------------------------------------Please note that this is just a sample, and isn't a complete solution.
Regards,
Damba
Re: VPN Multiple connection
Nisha,
Mediator is only used to find two peers, all conversation between two peers is made between then without using mediator in middle.
When you load new instance in MediatorConnected Event you should add also MyID Property and issue Search Method if you want that MediatorConnected fired again.
When this is done please make sure that same instance isn't load again in MediatorConnected Event because you will most probably get infinite loop.
Drazen
Re: VPN Multiple connection
Hello,
Thanks for response.
I have specified all things which you are talking (eg myIp and calling search method too)
i am sending the code through mail..
please test the same and let me know your comments for these multiple remote peers issue (server-client approach)
Regards,
Nisha