Code example for Socket

Methods: close, shutdownInput, shutdownOutput

0
	public void disconnect() throws IOException { 
		if (debug > 0)
			System.err.println("Wrapper: disconnect()");
		 
		/* we need to shut down io or close() will wait for it */ 
		socket.shutdownInput();
		socket.shutdownOutput();
		socket.close();		
	} 
 
	/** 
	 * Login into remote host. This is a convenience method and only works if 
	 * the prompts are "login:" and "Password:". 
	 *  
	 * @param user 
	 *            the user name 
	 * @param pwd 
	 *            the password 
	 */ 
	public void login(String user, String pwd) throws IOException {
		System.out.println("send user...");