Example #1
0
 public void messageSendErrorCallbackHandler(TransmissionErrorCode errorCode)
 {
     if (errorCode == TransmissionErrorCode.CliNoEndPointConnection)
     {
         Console.WriteLine("Could not connect to target");
     }
     else
     {
         Console.WriteLine("Error sending message");
     }
 }
Example #2
0
        //error callback - creates a pop up informing the user that an error of (type) has occured
        public void errorCallback(TransmissionErrorCode errorCode)
        {
            String message = "oh no! anyway";

            switch (errorCode) //IDE autogenerated all these cases for the enum, cool!
            {
            case TransmissionErrorCode.CliNoEndPointConnection:
                message = "Could not connect to target IP.\nPerhaps your contact is offline, or the IP address is wrong.";
                break;

            case TransmissionErrorCode.CliKeyExchangeFail:
                message = "Error sending message.\nFailed to exchange keys";
                break;

            case TransmissionErrorCode.CliConnectionLost:
                message = "Error sending message.\nConnection with target lost";
                break;

            case TransmissionErrorCode.CliTransmissionError:
                message = "Error sending message.\nUnspecified transmission error";
                break;

            case TransmissionErrorCode.CliNoReceiveConfirmaton:
                message = "Error sending message.\nDid not get confirmation of message being succesfully received by contact";
                break;

            case TransmissionErrorCode.ServTotalLengthError:
                message = "Error receiving message.\nTotal length of transmission did not match actual length";
                break;

            case TransmissionErrorCode.ServDecOrValError:
                message = "Error receiving message.\nException trying to decrypt or validate message";
                break;

            case TransmissionErrorCode.ServValidationFail:
                message = "Error receiving message.\nSignature of received message failed to validate";
                break;

            default:
                break;
            }

            messageAppForm.createPopUp(message);
        }
Example #3
0
 //calls callback method of controller to inform it that some error occured
 private void reportReceiveError(TransmissionErrorCode errorCode)
 {
     //Console.WriteLine($"receive error - code {code}");
     controllerReceiveErrorReport(errorCode);
 }
Example #4
0
 public void messageReceiveErrorCallbackHandler(TransmissionErrorCode errorCode)
 {
     Console.WriteLine($"Error receiving message - code {errorCode.ToString()}");
 }