Code example for ServerSocket

Methods: close, isBound, isClosed

0
			 * Log.i("Hugedata:TcpServerService", "serverSocket before:" + 
			 * (serverSocket.isClosed() ? "closed" : "not closed")); 
			 * Log.i("Hugedata:TcpServerService", "serverSocket before:" + 
			 * (serverSocket.isBound() ? "Bound" : "not Bound")); 
			 */ 
			serverSocket = new ServerSocket();
			serverSocket.close();
			Log.i("Hugedata:TcpServerService", "serverSocket after:"
					+ (serverSocket.isClosed() ? "closed" : "not closed"));
			Log.i("Hugedata:TcpServerService", "serverSocket after:"
					+ (serverSocket.isBound() ? "Bound" : "not Bound"));
 
			Editor editor = mSharedPreferences.edit();
			editor.putBoolean("tcpServerRunning", false);
			editor.commit();
 
			Message msg = new Message();
			msg.what = SERVER_CLOSE_SUCCESSFUL;
			myToast.sendMessage(msg);
 
			Message msg1 = new Message();