This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Can you be elaborate on who is the Client and Server? From Your earlier post, I assume - Your Friend's computer is the client and your computer as the Server.
abalfazl hossein wrote:The story is, I ran this program on his computer, for first time, His computer be as server and client,as time that I ran on my computer, On my computer it works, But on his computer it throws that exception.
Please be specific on these facts- Are both Client and Server running on same machine- Your or your friends? or both running on different machines? In which case- who is the server and client. To connect to a computer you need to know a way to communicate with it- Knowing its Public IP address and the port on which the application is running.
A "connection reset" means that the network plumbing went down; and it is a notice from the system. It could be caused by anything. The network can be configured to timeout the connection (on either side). The other side could have closed the connection. Or there could even be some sort of firewall running, that prevents the connection (even on the same machine).
IOW, the only way to debug it, is to probably load up a network sniffer to hunt it down.
abalfazl hossein wrote:My IP address [?]: 94.183.229.216 [Whois] [Reverse IP]
My IP country code: IR
My IP address country: ip address flag Iran, Islamic Republic of
....
Ahhh... Okay. Why are you telling us this?
Henry
abalfazl hossein
Ranch Hand
Joined: Sep 06, 2007
Posts: 602
posted
0
I try again!
My other fired lives in another city, I sent for him server code:
this is for client
abalfazl hossein
Ranch Hand
Joined: Sep 06, 2007
Posts: 602
posted
0
May someone answer?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
It looks like both client and server exhibit the Don't println to a Socket bug. (There may be other problems, but that one jumped out at me.)
run:
Server: HELO
Server: Hi there
Server:
Server: .
ok
Ok
When I type Ok, Nothing happened
and also it does not print ouit
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
Ulf Dittmer wrote:It looks like both client and server exhibit the Don't println to a Socket bug. (There may be other problems, but that one jumped out at me.)
Mihai Calin
Greenhorn
Joined: Jan 10, 2011
Posts: 2
posted
0
i want to test this program,
Is it possible my computer be client and server?
Why are you ignoring my posts? As long as your socket code calls "readLine" or "println" it's liable not to work correctly (or not at all).
abalfazl hossein
Ranch Hand
Joined: Sep 06, 2007
Posts: 602
posted
0
Sometimes this program does't work and folks told me it is about firewall or maybe my computer is behind a NAT
Then how other programs access to internet without any problem?If it is a permission, I can give permission and it isn't necessery to turn off firewall.
abalfazl hossein wrote:
Sometimes this program does't work and folks told me it is about firewall or maybe my computer is behind a NAT
Then how other programs access to internet without any problem?If it is a permission, I can give permission and it isn't necessery to turn off firewall.
Well, if you are behind a NAT server, you should have no problems accessing the internet. A NAT hides you from the internet, it doesn't hide the internet from you.
If you want a machine on the internet to get you a NAT'ed machine, you will need to configure the server to forward ports to your machine.
Henry
abalfazl hossein
Ranch Hand
Joined: Sep 06, 2007
Posts: 602
posted
0
Thanks Sir,
If you want a machine on the internet to get you a NAT'ed machine, you will need to configure the server to forward ports to your machine.
Well, your clients need to use some sort of IP address and port to make contact with your server. If your server is in a LAN, it has a local IP address which is not visible to your clients. What you need to do is configure your router (which has an IP address that *is* visible to your clients) to forward any packets it receives on a specific port to your server.
abalfazl hossein
Ranch Hand
Joined: Sep 06, 2007
Posts: 602
posted
0
Thanks, But MSN messenger, Or Yahoo messenger doesn't manipulate the router.
I posted about port forwarding in this thread three weeks ago (see my post of Thursday, December 30, 2010 08:05:57). It looks like you're chasing your tail at this point.