Code example for Socket

Methods: close, shutdownInput, shutdownOutput

0
      setupHeartbeat(false); 
      setupHold(false); 
      /* setupUpdateRequest(false); */ 
      if (mSocket != null) {
        try { 
          mSocket.shutdownInput();
          mSocket.shutdownOutput();
          mSocket.close();
        } catch (IOException e) {
          e.printStackTrace();
        } 
      } 
      mSocket = null;
    } catch (Exception e) {
      e.printStackTrace();
    } 
  } 
 
  /** 
   * @param input 
   *          stream of data (payload)