Wrox Programmer Forums
|
BOOK: Professional XMPP Programming with JavaScript and jQuery
This is the forum to discuss the Wrox book Professional XMPP Programming with JavaScript and jQuery by Jack Moffitt; ISBN: 978-0-470-54071-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional XMPP Programming with JavaScript and jQuery section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2012, 02:27 AM
Registered User
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 11 not working

I have tried to get working code of chapter 11 and when a toetem client clicks on wait button no iq arrives to referee. I have proved with code in git and modifying it to using my own local ejabberd server, and the problem is the same, I recieve in the toetem client an iq with error code 503, type "cancel" and service-unavailable.

I think that the server complains with the namespace "http://metajack.im/ns/toetem".

How can I solve this?

Thank you.
 
Old March 19th, 2012, 12:56 PM
Wrox Author
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

My guess is that you are setting the JID to a bare JID instead of a full JID.

Sending an IQ to a bare JID results in the IQ getting handled by the server's session manager, not the destination client.
 
Old March 19th, 2012, 01:51 PM
Registered User
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok. Thank you. Now it is working.

Anyway, Do you think that the client must know the full ID of the referee at login time? Each time I execute the referee the resource part of the JID changes; I have dealed with this responding the direct presence of the toetem client with a direct presence from the referee to the client, so it can store the full JID of the referee and use it to send IQ's.
 
Old March 20th, 2012, 12:53 AM
Wrox Author
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

The example program needs to know the full JID at login time, but in a real game server system you would have some way to discover the correct addresses, or the addresses would be well known. Since I don't have control over what addresses you will use to run the program, I wrote it so that you had to know them at login.

It sounds like you are implementing discovery, which is great. I left things like that out to keep it as simple as possible.





Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 11 cinek BOOK: Beginning iOS 4 Application Development 4 April 30th, 2011 05:13 PM
Previewing VideoRecording Not working Listings 11-9 to 11-10 rinkle BOOK: Professional Android 2 Application Development 1 June 21st, 2010 01:03 PM
Chapter 11 Moorish BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 11 June 4th, 2008 04:57 PM
chapter 11 figure 11-7 relative positioning pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 November 29th, 2007 06:11 AM
Chapter 11: kiley-s BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 10 March 8th, 2007 08:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.