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");
   }
 }
 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");
   }
 }
 private int connectImpl(InetAddress remote, int remotePort, int trafficClass) throws IOException {
   try {
     if (false) throw new cli.System.Net.Sockets.SocketException();
     if (false) throw new cli.System.ObjectDisposedException("");
     cli.System.Net.IPEndPoint ep =
         new cli.System.Net.IPEndPoint(
             PlainSocketImpl.getAddressFromInetAddress(remote), remotePort);
     if (isBlocking()) {
       fd.getSocket().Connect(ep);
       return 1;
     } else {
       asyncConnect = fd.getSocket().BeginConnect(ep, null, null);
       return IOStatus.UNAVAILABLE;
     }
   } catch (cli.System.Net.Sockets.SocketException x) {
     throw new ConnectException(x.getMessage());
   } catch (cli.System.ObjectDisposedException x1) {
     throw new SocketException("Socket is closed");
   }
 }