/// <summary> /// Starts the asynchronous authentication process. /// </summary> /// <param name="callback">The method to call when the authentication is complete.</param> public void BeginAuthenticate(HandShakeComplete callback) { _callBack = callback; Endpoint.BeginSend(GetAuthenticationBytes(), 0, 3 + Username.Length + Password.Length, SocketFlags.None, OnSent, Endpoint); }