Jabber-net 集成

发布于 2024-07-27 20:29:44 字数 323 浏览 5 评论 0原文

我想请求您提供有关如何使用 Google Talk Bot 来与我的服务器上的代码进行通信的帮助。

我已经从 code.google.com 下载了 Jabber-Net,但是那里的示例还不够......我对这些技术很陌生,并且不知道:

  1. 客户端将如何到达我的服务器? 我应该在哪里更改我的服务器的 [如果有] DNS?
  2. 我应该使用哪个服务器端库?
  3. 从这些示例中,我了解到我需要一个桌面应用程序不断在后台运行,这对我来说没有意义。

有谁有一些更好的参考示例来更好地理解这一点? 【抱歉我的无知……】

I'd like to ask your help regarding having a Google Talk Bot that will communicate with my code on my server.

I have downloaded Jabber-Net from code.google.com, but the examples there are not enough... I am new to these technologies, and have no clue about:

  1. How will client arrive to my server? where should I change [if any] DNS to my server?
  2. Which server side library should I use?
  3. From the examples I understood that I need to have a Desktop-app running in the background constantly, which doesn't make sense to me.

Does anyone has an example of some better references to understand this better?
[Sorry for my ignorance...]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦开始←不甜 2024-08-03 20:29:44
  1. 我不确定我是否正确理解你的问题。 如果您询问如何连接到所选服务器,控制台示例显示了如何简单地执行此操作,您只需填写 JID 类即可。
    来自 Jabber-Net 的示例
JabberClient jc = new JabberClient();
JID j = new JID(jid);
jc.User = j.User;
jc.Server = j.Server;
jc.NetworkHost = networkHost;
jc.Port = port;
jc.Resource = "Jabber.Net Console Client";
jc.Password = pass;
jc.AutoStartTLS = TLS;
jc.AutoPresence = initialPresence;
  1. 如果您想创建自己的服务器,有一个名为 agsxmpp 的库(也在 .NET 下运行),它允许创建服务器和客户端,它在 MIT/GPL 许可证上是开源的。 我不知道jabber-net是否启用此功能。 另一方面,如果您不想只使用其中一个“公共”服务器,那么有很多免费的 jabber 服务器,因此可能值得考虑仅使用已准备好启动的东西。

  2. 项目中有一个控制台示例,您不需要桌面应用程序(如果这就是您所要求的?),因此您可以编写服务、控制台应用程序或其他任何内容。

  1. I'm not sure if I understand what you ask correctly. If you're asking how to connect to chosen server, console sample shows how to do it simply, you basically fill out JID class.
    Sample from Jabber-Net
JabberClient jc = new JabberClient();
JID j = new JID(jid);
jc.User = j.User;
jc.Server = j.Server;
jc.NetworkHost = networkHost;
jc.Port = port;
jc.Resource = "Jabber.Net Console Client";
jc.Password = pass;
jc.AutoStartTLS = TLS;
jc.AutoPresence = initialPresence;
  1. If you want to create your own server, there's a library (also running under .NET) called agsxmpp, it allows to create both, server and client, it's open source on MIT/GPL license afair. I don't know if jabber-net enables this feature. On the other hand, there are plenty of free jabber-server if you don't want to just use one of "public" ones, so it may be worth to consider just using something that is ready to be launched.

  2. There's a console sample in the project, you don't need desktop-app (if this is what you were asking?), so you can write service, console app or anything else.

爱的十字路口 2024-08-03 20:29:44

这是最近的一篇文章,其中显示了使用 Gtalk 回复传入消息的示例。网

Here's a recent post that shows an example of replying to incoming messages on Gtalk using .NET

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文