private static ServerHandshake GenerateResponseHandshake(ClientHandshake handshake, Context context) { ServerHandshake responseHandshake = new ServerHandshake(); responseHandshake.Accept = GenerateAccept(handshake.Key, context); return responseHandshake; }
private static void SendServerHandshake(ServerHandshake handshake, Context context) { // generate a byte array representation of the handshake including the answer to the challenge string temp = handshake.ToString(); byte[] handshakeBytes = context.UserContext.Encoding.GetBytes(temp); context.UserContext.SendRaw(handshakeBytes); }
private static ServerHandshake GenerateResponseHandshake(ClientHandshake AHandshake, Context AContext) { ServerHandshake AResponseHandshake = new ServerHandshake(); AResponseHandshake.Accept = GenerateAccept(AHandshake.Key, AContext); return AResponseHandshake; }