docs: protected DatagramSocket initDatagramSocket(VirtualConnection vc) throws IOException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "Create new DatagramSocket: " + vc);
          }
          UDPChannelConfiguration channelConfig = udpChannel.getConfig();
          InetSocketAddress address = null;
  
          if (localBindAddress != null) {
              if (localBindAddress.equals("*")) {
                  localBindAddress = "0.0.0.0";
              }
              address = new InetSocketAddress(localBindAddress, localBindPort);
  
              if (address.isUnresolved()) {
                  String displayableHostName = channelConfig.getHostname();
                  if (displayableHostName == null) {
                      displayableHostName = "*";
                  }
                  Tr.error(tc, "CWUDP0004E", new Object[] { channelConfig.getExternalName(), displayableHostName, String.valueOf(channelConfig.getPort()) });
                  throw (new IOException("local address unresolved"));
              }
          }
  
          datagramChannel = DatagramChannel.open();
          DatagramSocket datagramSocket = datagramChannel.socket();
  
          // never reuse - only one app can have the port open
          datagramSocket.setReuseAddress(false);
          datagramChannel.configureBlocking(false);
  
          // receieve buffer size for sockets is set on datagramSocket,
          // send buffer size is set on individual sockets
  
          if ((channelConfig.getReceiveBufferSize() >= UDPConfigConstants.RECEIVE_BUFFER_SIZE_MIN)
              && (channelConfig.getReceiveBufferSize() <= UDPConfigConstants.RECEIVE_BUFFER_SIZE_MAX)) {
              int size = datagramSocket.getReceiveBufferSize();
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "setting receive buffer to size " + channelConfig.getReceiveBufferSize());
              }
              try {
                  datagramSocket.setReceiveBufferSize(channelConfig.getReceiveBufferSize());
                  int size1 = datagramSocket.getReceiveBufferSize();
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      if (size == size1) {
                          Tr.debug(tc, "setting receive buffer had no effect, still the same size ");
                      }
                  }
              } catch (SocketException e) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Caught SocketException " + e.getMessage() + " while trying to setReceiveBufferSize to " + channelConfig.getReceiveBufferSize());
                  }
              } catch (IllegalArgumentException e) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Caught IllegalArgumentException " + e.getMessage() + " while trying to setReceiveBufferSize to " + channelConfig.getReceiveBufferSize());
                  }
              }
          }
          if ((channelConfig.getSendBufferSize() >= UDPConfigConstants.SEND_BUFFER_SIZE_MIN) && (channelConfig.getSendBufferSize() <= UDPConfigConstants.SEND_BUFFER_SIZE_MAX)) {
              int size = datagramSocket.getSendBufferSize();
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "setting send buffer to size " + channelConfig.getSendBufferSize());
              }
              try {
                  datagramSocket.setSendBufferSize(channelConfig.getSendBufferSize());
                  int size1 = datagramSocket.getSendBufferSize();
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      if (size == size1) {
                          Tr.debug(tc, "setting send buffer had no effect, still the same size ");
                      }
                  }
              } catch (SocketException e) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Caught SocketException " + e.getMessage() + " while trying to setSendBufferSize to " + channelConfig.getSendBufferSize());
                  }
              } catch (IllegalArgumentException e) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Caught IllegalArgumentException " + e.getMessage() + " while trying to setSendBufferSize to " + channelConfig.getSendBufferSize());
                  }
              }
          }
          try {
              datagramSocket.bind(address);
              selectorMonitor.setChannel(datagramChannel, this);
          } catch (IOException ioe) {
              String displayableHostName = channelConfig.getHostname();
              if (displayableHostName == null) {
                  displayableHostName = "*";
              }
              Tr.error(tc, "CWUDP0005E", new Object[] { channelConfig.getExternalName(), displayableHostName, String.valueOf(channelConfig.getPort()) });
              throw new IOException(ioe.getMessage());
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "new ServerSocket successfully created");
          }
  
          return datagramChannel.socket();
      }