code: @Override
      public void close() {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "close");
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "SocketChannel close starting, local: " + socket.getLocalSocketAddress() + " remote: " + socket.getRemoteSocketAddress());
          }
          // synchronize on this SocketIOChannel to prevent duplicate closes from
          // being processed
          synchronized (this) {
              if (closed) {
                  processClose = false;
              }
              closed = true;
          }
          if (processClose) {
              try {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                      Tr.event(tc, "AsyncSocketChannel close, local: " + socket.getLocalSocketAddress() + " remote: " + socket.getRemoteSocketAddress());
                  if (asyncChannel != null) {
                      asyncChannel.close();
                  }
              } catch (IOException ioe) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "IOException while closing channel " + ioe.getMessage());
                  }
              } finally {
                  super.close();
              }
          } else {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "close called on channel already closed, local: " + socket.getLocalSocketAddress() + " remote: " + socket.getRemoteSocketAddress());
              }
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "close");
          }
      }
docs: Close the socket