public Message CreateNonCriticalErrorMessage(string To, MeshworkError error) { var p = new Message(network, MessageType.NonCriticalError); p.To = To; p.Content = error; return(p); }
public Message CreateCriticalErrorMessage(Node MessageTo, MeshworkError error) { var m = new Message(network, MessageType.CriticalError); m.To = MessageTo.NodeID; m.Content = error; return(m); }
internal void ProcessNonCriticalErrorMessage(Node messageFrom, MeshworkError error) { if (error is NotTrustedError) { messageFrom.ClearSessionKey(); messageFrom.RemotelyUntrusted = true; } else if (error is FileTransferError) { var id = ((FileTransferError)error).TransferId; foreach (var transfer in network.Core.FileTransferManager.Transfers) { if (transfer.Id == id) { ((IFileTransferInternal)transfer).ErrorReceived(messageFrom, (FileTransferError)error); break; } } } else { network.RaiseReceivedNonCriticalError(messageFrom, error); } }
public Message CreateNonCriticalErrorMessage(Node To, MeshworkError error) { return(CreateNonCriticalErrorMessage(To.NodeID, error)); }