for client i specified remotehost and port; for server i specified only port;
my computer is being assigned an internal ip address.
when i chose TcpClient->RemoteHost="192.168....." my aplication works in LAN just fine (application is more than exchanging text).
my router is getting external ip address, and that's the problem.
i can't make my application send data to a computer which is assigned an internal ip address (out from my LAN).
so, if anyone is introduced with this, at least tell me where to start (keep) digging. thanks in advance
Your problem is network configuration.
The first you need to check subnets. Are your computers situated in the one subnet?
Did you open a port for your application on PC's?
i don't know what NAT is..
no, i can't access... my server and client can't "see" each other... (except when i specify local ip address for server it works fine)
here's my thinking:
external addressing --- i`m addressing router
so, how can i make server receive data that is addressed to external ip?
is there some port-bandwidth i can use in subnet (like ports are reserved or attached to computers) or i can use any port?
It doesn't work like that. An attempt to connect to an address outside the local subnet is passed to the default gateway, which out to be a router. The router should pass the request on and pass you back the reply.
I think you need to sort out your network config before testing your app. If you're doing network programming, you are expected to understand how networking works in general.
well, i don't understand. i`m still a student using my thinly knowledge in desperate attempt to make game for me and my friend. it lasts for weeks.
what i was saying: when i`m sending data like i did (client sends msg to external ip adress) i did not address the machine which is suppose to receive that? LAN has 13 computers and there is only one external ip?
I understand that your comms works on your LAN, but not outside it.
But you haven't provided enough information to diagnose your problem.
- Can the two machines involved ping each other?
- What does trace route say? (tracert on Windows, traceroute on UNIX)
- What protocol are you using TCP or UDP?
- Are you using broadcast or point to point endpoints?