Results 1 to 2 of 2
Thread: how can i disconnect client?
- 01-24-2008, 08:44 AM #1
Member
- Join Date
- Jan 2008
- Posts
- 14
- Rep Power
- 0
how can i disconnect client?
hello everyone!
can anyone help me on how client can be disconnected immediately when receive message from the server?
do {
try {
String *message*= input.readUTF();
displayArea.append( "\n" + message );
displayArea.setCaretPosition(
displayArea.getText().length() );
}
catch ( IOException ioException ) {
displayArea.append( "\nUnknown object type received" );
}
} while ( message!=1 );
displayArea.append( "\nClosing connection.\n" );
// close streams and socket
output.close();
input.close();
client.close();
displayArea.append( "Connection closed." );
- 01-24-2008, 04:52 PM #2
close() should work for you... just for kicks - what are output, input and client's type?
Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice? Vote now!
Got a little Capt'n in you? (drink responsibly)
Similar Threads
-
Client IP Address
By goodjonx in forum NetworkingReplies: 3Last Post: 09-23-2009, 10:27 AM -
UDP Client help
By misslilbit02 in forum Advanced JavaReplies: 0Last Post: 03-09-2008, 07:31 PM -
Identify Client in Socket Client Server Application
By masadjie in forum NetworkingReplies: 1Last Post: 12-20-2007, 09:18 AM -
ThinkUI SQL Client 1.0.1
By levent in forum Java SoftwareReplies: 0Last Post: 07-26-2007, 08:18 PM -
client for PERFORCE
By Ed in forum New To JavaReplies: 2Last Post: 07-02-2007, 07:30 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks