/// <summary> /// Default ctor /// </summary> internal LocoIO(PeerXferResponse response, LocoBuffer lb) { this.lb = lb; Address = response.Source; var version = response.LocoIOVersion; Version = string.Format("{0}.{1}", version / 100, version % 100); }
/// <summary> /// Handle the given message /// </summary> /// <returns>True if handled</returns> protected virtual bool ReceivePeerXferResponse(PeerXferResponse msg) { if (msg.SvAddress == 0) { if (!msg.IsSourcePC) { var entry = new LocoIO(msg, lb); LocoIOFound.Fire(this, new PropertyEventArgs <ILocoIO>(entry)); } } return(true); }
/// <summary> /// Peer transfer. /// </summary> public override bool Visit(PeerXferResponse msg, Client data) { return(data.ReceivePeerXferResponse(msg)); }
public virtual TReturn Visit(PeerXferResponse msg, TData data) { return(default(TReturn)); }