コード例 #1
0
 public static void SetUrl()
 {
     if (_url == null && System.IO.File.Exists("social.config"))
     {
         SocialConfig config = Utils.ReadConfig <SocialConfig>("social.config");
         _url = "http://127.0.0.1:" + config.HttpPort + "/state.xml";
     }
 }
コード例 #2
0
ファイル: svpncmd.cs プロジェクト: hseom/brunet
 public static void CreateConfig(string uid) {
   SocialConfig social_config = new SocialConfig();
   social_config.BrunetConfig = "brunet.config";
   social_config.IpopConfig = "ipop.config";
   social_config.HttpPort = "58888";
   social_config.JabberPort = "5222";
   social_config.JabberID = uid;
   social_config.JabberPass = "******";
   social_config.AutoLogin = false;
   social_config.GlobalBlock = false;
   social_config.AutoFriend = false;
   Utils.WriteConfig("social.config", social_config);
 }
コード例 #3
0
        public static SocialConfig CreateConfig()
        {
            SocialConfig social_config = new SocialConfig();

            social_config.BrunetConfig = "brunet.config";
            social_config.IpopConfig   = "ipop.config";
            social_config.HttpPort     = "58888";
            social_config.JabberPort   = "5222";
            social_config.JabberID     = "*****@*****.**";
            social_config.JabberPass   = "******";
            social_config.AutoLogin    = false;
            social_config.GlobalBlock  = true;
            social_config.AutoFriend   = false;
            social_config.AutoDns      = true;
            Utils.WriteConfig(SocialNode.CONFIGPATH, social_config);
            return(social_config);
        }
コード例 #4
0
        public SocialConnectionManager(SocialNode node, RpcManager rpc,
                                       SocialDnsManager sdm, SocialStatsManager ssm, SocialConfig config)
        {
            _rpc = rpc;
            _rpc.AddHandler(RPCID, this);
            _sdm          = sdm;
            _node         = node;
            _ssm          = ssm;
            _networks     = ImmutableDictionary <string, ISocialNetwork> .Empty;
            _fprs         = ImmutableDictionary <string, string> .Empty;
            _times        = ImmutableDictionary <string, DateTime> .Empty;
            _pending      = ImmutableList <string> .Empty;
            _blocked      = ImmutableList <string> .Empty;
            _beat_counter = 0;
            _auto_allow   = config.AutoFriend;
            _sdm.Sender   = this;
#if !SVPN_NUNIT
            _timer = new Timer(TimerHandler, _beat_counter, PERIOD, PERIOD);
            LoadState();
#endif
        }
コード例 #5
0
    public SocialConnectionManager(SocialNode node, RpcManager rpc,
      SocialDnsManager sdm, SocialStatsManager ssm, SocialConfig config) {
      _rpc = rpc;
      _rpc.AddHandler(RPCID, this);
      _sdm = sdm;
      _node = node;
      _ssm = ssm;
      _networks = ImmutableDictionary<string, ISocialNetwork>.Empty;
      _fprs = ImmutableDictionary<string, string>.Empty;
      _times = ImmutableDictionary<string, System.DateTime>.Empty;
      _pending = ImmutableList<string>.Empty;
      _blocked = ImmutableList<string>.Empty;
      _beat_counter = 0;
      _auto_allow = config.AutoFriend;
      _sdm.Sender = this;
#if !SVPN_NUNIT
      _timer = new Timer(TimerHandler, _beat_counter, PERIOD, PERIOD);
      LoadState();
#endif

    }