コード例 #1
0
 private void closeImpl() throws IOException {
   try {
     if (false) throw new cli.System.Net.Sockets.SocketException();
     if (false) throw new cli.System.ObjectDisposedException("");
     fd.getSocket().Close();
   } catch (cli.System.Net.Sockets.SocketException x) {
     throw PlainSocketImpl.convertSocketExceptionToIOException(x);
   } catch (cli.System.ObjectDisposedException x1) {
     throw new SocketException("Socket is closed");
   }
 }
コード例 #2
0
 private static void shutdown(FileDescriptor fd, int how) throws IOException {
   try {
     if (false) throw new cli.System.Net.Sockets.SocketException();
     if (false) throw new cli.System.ObjectDisposedException("");
     fd.getSocket()
         .Shutdown(
             cli.System.Net.Sockets.SocketShutdown.wrap(
                 how == SHUT_RD
                     ? cli.System.Net.Sockets.SocketShutdown.Receive
                     : cli.System.Net.Sockets.SocketShutdown.Send));
   } catch (cli.System.Net.Sockets.SocketException x) {
     throw PlainSocketImpl.convertSocketExceptionToIOException(x);
   } catch (cli.System.ObjectDisposedException x1) {
     throw new SocketException("Socket is closed");
   }
 }