Code example for Socket

Methods: closeshutdownInputshutdownOutput

0
 
        public void cancel() 
        { 
            try 
            { 
                mSocket.shutdownInput();
                mSocket.shutdownOutput();
                mmInStream.close();
                mmOutStream.close();
                mSocket.close();
                mSocket = null;
            } 
            catch (Exception e)
            { 
                Log.e(TAG, "close() of connect socket failed", e);
            } 
        } 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java