public void ConfigureSIF_Protocol( SIF_Protocol proto, IZone zone ) { proto.Type = Protocol.ToUpperInvariant(); proto.SetSecure( Secure ? YesNo.YES : YesNo.NO ); String host = getPushHostName(); int port = ((HttpProperties) fProps).PushPort; if ( port == -1 ) { port = this.Port; } UriBuilder builder = new UriBuilder(); builder.Scheme = this.Protocol; builder.Host = host.Trim(); builder.Port = port; builder.Path = "/zone/" + zone.ZoneId + "/"; proto.SIF_URL = builder.Uri.AbsoluteUri; }
/// <summary> /// Creates the SIF_Protocol object that will be included with a SIF_Register /// message sent to the zone associated with this Transport.</Summary> /// <remarks> /// The base class implementation creates an empty SIF_Protocol with zero /// or more SIF_Property elements according to the parameters that have been /// defined by the client via setParameter. Derived classes should therefore /// call the superclass implementation first, then add to the resulting /// SIF_Protocol element as needed. /// </remarks> /// <param name="zone"></param> /// <returns></returns> public override SIF_Protocol MakeSIF_Protocol( IZone zone ) { SIF_Protocol proto = new SIF_Protocol(); fTransport.ConfigureSIF_Protocol(proto, zone); return proto; }