static void rfbSendSecurityType(rfbClientPtr cl, int securityType)
{
  CARD32 value32;

  value32 = Swap32IfLE(securityType);
  if (WriteExact(cl, (char *)&value32, 4) < 0) {
    rfbLogPerror("rfbSendSecurityType: write");
    rfbCloseClient(cl);
    return;
  }

  switch (securityType) {
    case rfbSecTypeNone:
      /* Dispatch client input to rfbProcessClientInitMessage() */
      cl->state = RFB_INITIALISATION;
      break;
    case rfbSecTypeVncAuth:
      /* Begin the Standard VNC authentication procedure */
      rfbVncAuthSendChallenge(cl);
      break;
    default:
      rfbLogPerror("rfbSendSecurityType: assertion failed");
      rfbCloseClient(cl);
  }
}
static void rfbSendSecurityType(rfbClientPtr cl, int securityType)
{
  CARD32 value32;

  value32 = Swap32IfLE(securityType);
  if (WriteExact(cl, (char *)&value32, 4) < 0) {
    rfbLogPerror("rfbSendSecurityType: write");
    rfbCloseClient(cl);
    return;
  }

  switch (securityType) {
    case rfbSecTypeNone:
       
      cl->state = RFB_INITIALISATION;
      break;
    case rfbSecTypeVncAuth:
       
      rfbVncAuthSendChallenge(cl);
      break;
    default:
      rfbLogPerror("rfbSendSecurityType: assertion failed");
      rfbCloseClient(cl);
  }
}