コード例 #1
0
 public void AddStreamFeatures(ServerConnectionHandler serverSession, StreamFeatures features)
 {
     if (serverSession.SessionState < SessionState.Binded)
     {
         features.Add(new Bind());
     }
 }
コード例 #2
0
 public void AddStreamFeatures(ServerConnectionHandler serverSession, StreamFeatures features)
 {
     ServerSession = serverSession;
     if (serverSession.SessionState < Matrix.SessionState.Secure)
     {
         features.Add(new StartTls());
     }
 }
コード例 #3
0
        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);
        }