Results 1 to 2 of 2
Thread: Connecting server and client
- 06-30-2012, 01:17 PM #1
Member
- Join Date
- Jun 2012
- Posts
- 6
- Rep Power
- 0
Connecting server and client
I have a problem that when i use ServerSocket.accept() the program stops working until it recives a connection request from the client, my question is , Is there a way that while the ServerSocket is waiting for a client my program will continue working and when a client requests to connect the program will treat it like an event listener and activate a certain function
-
Re: Connecting server and client
Yes, do your accept in a background thread. For more on Java threading, please check out the Concurrency Tutorial.
Last edited by Fubarable; 06-30-2012 at 01:24 PM.
Similar Threads
-
How to prevent hacking game client-server by decompile->modify->package new client
By chanphat01001 in forum CLDC and MIDPReplies: 3Last Post: 06-03-2012, 09:48 AM -
How to prevent hacking game client-server by decompile->modify->package new client
By chanphat01001 in forum Advanced JavaReplies: 1Last Post: 06-03-2012, 03:07 AM -
how to loop client connecting attempt while server is not ready
By amro in forum NetworkingReplies: 9Last Post: 05-28-2011, 09:13 PM -
server-client; client sends a username to the server.
By lkcz in forum New To JavaReplies: 2Last Post: 09-24-2010, 11:31 AM -
Identify Client in Socket Client Server Application
By masadjie in forum NetworkingReplies: 1Last Post: 12-20-2007, 09:18 AM
Bookmarks