Jabber-net integration
Asked Answered
I

2

2

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...]

Impatiens answered 19/7, 2009 at 19:41 Comment(0)
C
4
  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.

Chorion answered 19/7, 2009 at 20:9 Comment(7)
I checked agsXmpp, and this is what they are saying at ag-software.de/index.php?page=faq : "Can I build a XMPP server with agsXMPP? Yes you can. But writing a XMPP server is a very compex task. The idea of XMPP is: simple client, complex server. Even if agsXMPP does lots of work for you, you have to study the XMPP RFC's in detail." ------ I'll try to be clearer with my question: Do you have an example of a tested client AND server library to create a Google Talk Bot? [I do not want to use IMified; it is not reliable for my purpose]Impatiens
I don't know why you would like a server library for building a bot. If you are building Google Talk Bot, you need a client to connect to google server. Check out this very simple app, meyb it will help you: <gtalkautoreply.codeplex.com>Hypochlorite
gtalkautoreply.codeplex.com - Sorry for an incorrect link in the comment above.Hypochlorite
I meant - a Google Talk Bot that will talk to my code. I need clients to use a Google Talk to communicate with my program [really sorry for being unclear...]Impatiens
I'm still a bit confused. You would like to host your own jabber server, connect google talk to it? - Won't work because gt connects to a google server, you won't change that (altough you could use other jabber clients for that). Other way is that you host google talk bot using only "client api", any user then can write a message using gt to you, and you can process that message, send reply, invoke some remote method etc. - but again, you need only client, not jabber server for that.Hypochlorite
Aha. So actually my code can even be stored on my local PC, but my PC will "listen" to Google Talk server, to the incoming messages? Is that the story?Impatiens
Yes, because once your 'local code' will login to google talk server (or any other jabber server), you will be able to receive messages sent to your login and reply to them (or invoke any other code). Actually - you can receive message not only from gt, but any jabber network + if you will host your own server (not necessary implemented by you, just use some ready one), create an user there, you will be able to create bot with jid like: [email protected], although enabling your server to communicate with other servers is really problematic afair.Hypochlorite
S
2

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

Scouring answered 19/7, 2009 at 20:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.