public void AddStreamFeatures(ServerConnectionHandler serverSession, StreamFeatures features) { if (serverSession.SessionState < SessionState.Binded) { features.Add(new Bind()); } }
public void AddStreamFeatures(ServerConnectionHandler serverSession, StreamFeatures features) { ServerSession = serverSession; if (serverSession.SessionState < Matrix.SessionState.Secure) { features.Add(new StartTls()); } }
private XmppXElement BuildStreamFeatures() { var feat = new StreamFeatures(); //feat.Add(new StartTls()); if (!IsAuthenticated) { var mechs = new Mechanisms(); mechs.AddMechanism(SaslMechanism.Plain); feat.Mechanisms = mechs; } else if (!IsBinded && IsAuthenticated) { feat.Add(new Bind()); } return(feat); }