Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to know in socket programming client and Server can communicate with each other if both on different network place .. like a skype messenger ..
e.g i just want to send "hello string " from clients and recieve its on server then after response back to clients that "server recieved your message" ..
Posted
Updated 26-Nov-14 5:41am
v3

To send a message to someone you need to be able to reach the destination address, if you are sending between different local networks and you don't have a bridge/router in between then you can't send.

To see if it is possible try :
c:\>ping <your destination="" ip=""></your>

If it does not work then you can't send.
 
Share this answer
 
Comments
Mehdi Gholam 26-Nov-14 7:29am    
We can talk because we are talking through a 3rd party messaging service, for TCP/UDP you need a direct connection.
Mehdi Gholam 26-Nov-14 7:57am    
Skype has a central server where everyone connects to to advertise their availability.
This has nothing to do with your coding, and everything to do with your network configuration and firewall. If you cannot ping between client and server then there is no open route between those two points. If this is your network then you need to check the firewall settings and also the routing tables. If this is someone else's network then you need to ask them for assistance.
 
Share this answer
 
Comments
[no name] 26-Nov-14 12:42pm    
as you know, if skype server ping my ip ,then skype server will get response? ofcourse not
but skype server still communicating with Clients. how its going ????
Richard MacCutchan 26-Nov-14 12:46pm    
Skype is a webbased system that routes through a webserver.
[no name] 27-Nov-14 13:40pm    
skype is window bassed system but its use socket programming and windows services

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900