Java Code Examples for android.system.Os#shutdown()
The following examples show how to use
android.system.Os#shutdown() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LocalSocketImpl.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
/** * Shuts down the input side of the socket. * * @throws IOException */ protected void shutdownInput() throws IOException { if (fd == null) { throw new IOException("socket not created"); } try { Os.shutdown(fd, OsConstants.SHUT_RD); } catch (ErrnoException e) { throw e.rethrowAsIOException(); } }
Example 2
Source File: LocalSocketImpl.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
/** * Shuts down the output side of the socket. * * @throws IOException */ protected void shutdownOutput() throws IOException { if (fd == null) { throw new IOException("socket not created"); } try { Os.shutdown(fd, OsConstants.SHUT_WR); } catch (ErrnoException e) { throw e.rethrowAsIOException(); } }