当前位置: 首页>>代码示例>>C#>>正文


C# Proxy.Start方法代码示例

本文整理汇总了C#中Proxy.Start方法的典型用法代码示例。如果您正苦于以下问题:C# Proxy.Start方法的具体用法?C# Proxy.Start怎么用?C# Proxy.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Proxy的用法示例。


在下文中一共展示了Proxy.Start方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main

	public static void Main(string[] args) {
		// configure the proxy
		ProxyConfig proxyConfig = new ProxyConfig("ChatConsole V2", "Austin Jennings / Andrew Ortman", args);
		proxy = new Proxy(proxyConfig);

		// set a delegate for when the client logs in
		proxy.SetLoginResponseDelegate(new XmlRpcResponseDelegate(Login));

		// add a delegate for incoming chat
		proxy.AddDelegate(PacketType.ChatFromSimulator, Direction.Incoming, new PacketDelegate(ChatFromSimulator));

		// start the proxy
		proxy.Start();
	}
开发者ID:RavenB,项目名称:gridsearch,代码行数:14,代码来源:ChatConsole.cs

示例2: Main

    public static void Main(string[] args)
    {
        // configure the proxy
        client = new SecondLife("../data/keywords.txt", "../data/message_template.msg");
        protocolManager = client.Protocol;
        ProxyConfig proxyConfig = new ProxyConfig("ChatConsole", "[email protected]", protocolManager, args);
        proxy = new Proxy(proxyConfig);

        // set a delegate for when the client logs in
        proxy.SetLoginResponseDelegate(new XmlRpcResponseDelegate(Login));

        // add a delegate for incoming chat
        proxy.AddDelegate("ChatFromSimulator", Direction.Incoming, new PacketDelegate(ChatFromSimulator));

        // start the proxy
        proxy.Start();
    }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:17,代码来源:ChatConsole.cs

示例3: Main

    public static void Main(string[] args)
    {
        // configure the proxy
        client = new SecondLife("../data/keywords.txt", "../data/message_template.msg");
        protocolManager = client.Protocol;
        ProxyConfig proxyConfig = new ProxyConfig("Analyst", "[email protected]", protocolManager, args);
        proxy = new Proxy(proxyConfig);

        // build the table of /command delegates
        InitializeCommandDelegates();

        // add delegates for login
        proxy.SetLoginRequestDelegate(new XmlRpcRequestDelegate(LoginRequest));
        proxy.SetLoginResponseDelegate(new XmlRpcResponseDelegate(LoginResponse));

        // add a delegate for outgoing chat
        proxy.AddDelegate("ChatFromViewer", Direction.Incoming, new PacketDelegate(ChatFromViewerIn));
        proxy.AddDelegate("ChatFromViewer", Direction.Outgoing, new PacketDelegate(ChatFromViewerOut));

        //  handle command line arguments
        foreach (string arg in args)
            if (arg == "--log-all")
                LogAll();
            else if (arg == "--log-login")
                logLogin = true;

        // start the proxy
        proxy.Start();
    }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:29,代码来源:Analyst.cs

示例4: Main

    public static void Main(string[] args)
    {
        libslAssembly = Assembly.Load("libsecondlife");
        if (libslAssembly == null) throw new Exception("Assembly load exception");

        ProxyConfig proxyConfig = new ProxyConfig("Analyst V2", "Austin Jennings / Andrew Ortman", args);
        proxy = new Proxy(proxyConfig);

        // build the table of /command delegates
        InitializeCommandDelegates();

        // add delegates for login
        proxy.SetLoginRequestDelegate(new XmlRpcRequestDelegate(LoginRequest));
        proxy.SetLoginResponseDelegate(new XmlRpcResponseDelegate(LoginResponse));

        // add a delegate for outgoing chat
        proxy.AddDelegate(PacketType.ChatFromViewer, Direction.Outgoing, new PacketDelegate(ChatFromViewerOut));

        //  handle command line arguments
        foreach (string arg in args)
            if (arg == "--log-all")
                LogAll();
            else if (arg == "--log-login")
                logLogin = true;

        // start the proxy
        proxy.Start();
    }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:28,代码来源:Analyst.cs


注:本文中的Proxy.Start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。