public I2PRouterAddress(BufRef buf) { Cost = buf.Read8(); Expiration = new I2PDate(buf); TransportStyle = new I2PString(buf); Options = new I2PMapping(buf); }
public I2PRouterAddress(IPAddress addr, int port, byte cost, string transportstyle) { Cost = cost; Expiration = I2PDate.Zero; TransportStyle = new I2PString(transportstyle); Options = new I2PMapping(); Options["host"] = addr.ToString(); Options["port"] = port.ToString(); }
public string this [string key] { set { Mappings[new I2PString(key)] = new I2PString(value); } get { return(Mappings[new I2PString(key)].ToString()); } }
public I2PMapping(BufRef buf) { var bytes = buf.ReadFlip16(); var endpos = buf.BaseArrayOffset + bytes; while (buf.BaseArrayOffset < endpos) { var key = new I2PString(buf); if (buf.Peek8(0) == '=') { buf.Seek(1); } var value = new I2PString(buf); if (buf.Peek8(0) == ';') { buf.Seek(1); } Mappings[key] = value; } }
internal int CompareTo(I2PString other) { return(string.CompareOrdinal(Str, other.Str)); }
public I2PString(I2PString src) { Str = src.Str; }
internal int CompareTo(I2PString other) { return(Str.CompareTo(other.Str)); }