Code example for LocalSocket

Methods: close, shutdownInput, shutdownOutput

0
 
        if (mSocket == null)
            return; 
 
        try { 
            mSocket.shutdownInput();
        }catch(IOException e) {
            Log.e(TAG, "Local shutdownInput() of mSocket failed", e);
        } 
 
        try { 
            mSocket.shutdownOutput();
        }catch(IOException e) {
            Log.e(TAG, "Local shutdownOutput() of mSocket failed", e);
        } 
 
        try { 
            mInputStream.close();
        }catch(IOException e) {
            Log.e(TAG, "Local close() of mInputStream failed", e);
        } 
 
        try { 
            mOutputStream.close();
        }catch(IOException e) {
            Log.e(TAG, "Local close() of mOutputStream failed", e);
        } 
 
        try { 
            mSocket.close();
        }catch(IOException e) {
            Log.e(TAG, "Local close() of mSocket failed", e);
        } 
 
        mInputStream = DummyInputStream.instance;