|
-
January 30th, 2003, 01:19 PM
#1
Server closing after running only once
Hi.
In the file transfer client-server program (Socket Programming) I wrote, the server program is closing after only one transfer has been made. I want my server program to run all the time and continously accept client requests.
Can someone plz help me and tell me what to do?
Thanks
-
February 3rd, 2003, 04:52 AM
#2
Hi,
Without seeing the code I'm going to take a guess at this, you are only accepting client connections once, possibly in a constructor or so. What you could do is extend Thread or implement Runnable and in the run method continually call the ServerSocket.accept() method in a while loop, this way you server will continously listen for new client connections.
Good Luck
Byron
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|