Code example for Socket

Methods: getLocalSocketAddress

0
	 *  
	 */ 
	private boolean openSocket() { 
		// Try and open the socket. 
		try { 
			socket = new Socket(GTOServerAddress, 80);
			mgStats.setStat("ip.local", "" + socket.getLocalSocketAddress());
			mgStats.setStat("socket.error", "");
		} catch (Exception e) {
			msg("Error establishing socket for DTC lookup. E=" + e.getMessage());
			mgStats.setStat("socket.error", "" + e.getMessage());
			return false; 
		} 
 
		return true; 
	} 
 
	public String getDTCDescription(String DTC) {
		String description = "";
 
		description = getDTCCachedDescription(DTC);