本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}