I just develop a simple 2 apps related with socket.
one is server and one is client. they are working fine in a LAN but i want that if my 2 apps is running in two different machine and there is no
lan connection, only internet connection is available then how two apps can interact with each by through socket programming other internet.
suppose there is two machine in two different office and there is no connection between two machine but both the machine can access internet.
in this type of situation how socket client can communicate with socket server which running in different office and internet is available in
2 different office.because we know socket server run on a port and wait for incoming connection and socket client will connect to socket server
through IP of that machine where socket server is running. but my situation we can provide IP address if both are member of same network/LAN but here i
told you that there is no connection between two machine where socket server & client is running. in this case what IP address i need to give to socket client to connect to socket server. i have no idea about this but i search google and found some scratch idea that this type of situation can be handle
through WAN IP. so please tell me is it right concept or not. if right then how socket client will know that what is the wan IP of that machine where socket server is running or suppose if i know the wan IP of that machine where socket server is running then can my socket client can communicate with
socket server just by WAN IP.
so please someone give me the idea in detail as a result i can handle this situation and also will be able that to program in such way that socket client
can communicate with socket server if there is no LAN connection but internet connection is available.
please help me with idea and if possible give me a sample code
one is server and one is client. they are working fine in a LAN but i want that if my 2 apps is running in two different machine and there is no
lan connection, only internet connection is available then how two apps can interact with each by through socket programming other internet.
suppose there is two machine in two different office and there is no connection between two machine but both the machine can access internet.
in this type of situation how socket client can communicate with socket server which running in different office and internet is available in
2 different office.because we know socket server run on a port and wait for incoming connection and socket client will connect to socket server
through IP of that machine where socket server is running. but my situation we can provide IP address if both are member of same network/LAN but here i
told you that there is no connection between two machine where socket server & client is running. in this case what IP address i need to give to socket client to connect to socket server. i have no idea about this but i search google and found some scratch idea that this type of situation can be handle
through WAN IP. so please tell me is it right concept or not. if right then how socket client will know that what is the wan IP of that machine where socket server is running or suppose if i know the wan IP of that machine where socket server is running then can my socket client can communicate with
socket server just by WAN IP.
so please someone give me the idea in detail as a result i can handle this situation and also will be able that to program in such way that socket client
can communicate with socket server if there is no LAN connection but internet connection is available.
please help me with idea and if possible give me a sample code
Comment