Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 19th, 2012, 02:27 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old March 19th, 2012, 12:56 PM
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 15 Times in 14 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.
Reply With Quote
  #3 (permalink)  
Old March 19th, 2012, 01:51 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #4 (permalink)  
Old March 20th, 2012, 12:53 AM
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 15 Times in 14 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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 05: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 07:19 PM



All times are GMT -4. The time now is 07:48 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.