Page 1 of 1

UDP

Posted: 20 Mar 2012, 23:00
by janheuninck
Hi,

I have some issues with the use of the UDP protocol in iOS.

1/ Initialization

Code: Select all

    // Initialize the UDP socket
    [smartFox initUDP:nil:-1];

According to http://docs2x.smartfoxserver.com/api-docs/objc-doc/Classes/SmartFox2XClient.html#//api/name/initUDP::: it isn't necessary to set the host and port parameters. If these are nil and -1 the values from the config file should be used. When I try this the program crashes on this line (SIGABRT). If I use the actual host and port as parameter everything works...

2/ Logging

When the client receives messages via UDP, the letter U is written to the console for every package:

Code: Select all

2012-03-20 15:57:30.540 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
2012-03-20 15:57:30.580 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
2012-03-20 15:57:30.623 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
2012-03-20 15:57:30.665 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
2012-03-20 15:57:30.706 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
2012-03-20 15:57:33.548 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
2012-03-20 15:57:33.592 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
2012-03-20 15:57:33.633 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
2012-03-20 15:57:33.676 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
2012-03-20 15:57:33.719 Client[2049:707] UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU


Is there a possibility to disable this logging? It's pretty annoying to debug...

Thanks!

PS: The debug mode is disabled:

Code: Select all

    // Initialize smartfox server
    smartFox = [[SmartFox2XClient alloc] initSmartFoxWithDebugMode:NO delegate:self];

Re: UDP

Posted: 25 Mar 2012, 04:57
by A51Integrated
Can you please verify that you're using the latest version of the API? We are unable to replicate the crash when using initUDP with nil and -1. Make certain your config XML has

Code: Select all

<udpHost>xxx.xxx.xxx.xxx</udpHost>
   <udpPort>9934</udpPort>


The "u" issue is valid. It's simply a leftover NSLog from testing and will be removed in the next release.

Re: UDP

Posted: 25 Mar 2012, 08:52
by janheuninck
A51Integrated wrote:Can you please verify that you're using the latest version of the API? We are unable to replicate the crash when using initUDP with nil and -1. Make certain your config XML has

Code: Select all

<udpHost>xxx.xxx.xxx.xxx</udpHost>
   <udpPort>9934</udpPort>


I used the "udpIp" tag instead of the "udpHost" tag in my configuration file. Now it works. Sorry for the misleading error :)

A51Integrated wrote:The "u" issue is valid. It's simply a leftover NSLog from testing and will be removed in the next release.

Thanks!