D
dora
Dear all,
I am a very novice Java programmer as you will realise by the content
of my e-mail.
I am currently taking the first steps on creating client-server
applications.
However, I experience the following problem; which must be probably
associated with parameter setting.
I try to run a very simple client-server application; where a server
grabs a port and waits
for a client to be connected. After a connection is established; it is
immediately closed.
I try to test this application on my localhost. Both of the programs
compile successfully. The server part of the program is running
successfully and is awaiting for a connection to be made with a client
(client=sock.accpet(). However, the client fails to connect with the
server and a connection exception is thrown. Alternatively I tried to
test my Server program by running telnet with the following command:
telnet localhost 5000(number of port that the server has grabbed) but
again a connection is failed to be established. Any ideas why?
Many thanks
Dora
I am a very novice Java programmer as you will realise by the content
of my e-mail.
I am currently taking the first steps on creating client-server
applications.
However, I experience the following problem; which must be probably
associated with parameter setting.
I try to run a very simple client-server application; where a server
grabs a port and waits
for a client to be connected. After a connection is established; it is
immediately closed.
I try to test this application on my localhost. Both of the programs
compile successfully. The server part of the program is running
successfully and is awaiting for a connection to be made with a client
(client=sock.accpet(). However, the client fails to connect with the
server and a connection exception is thrown. Alternatively I tried to
test my Server program by running telnet with the following command:
telnet localhost 5000(number of port that the server has grabbed) but
again a connection is failed to be established. Any ideas why?
Many thanks
Dora