Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Dec 06, 2019 4:04 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: problem with cocoa target and ServerSocket
PostPosted: Tue Jan 01, 2013 6:21 am 
Offline

Joined: Thu Feb 01, 2007 12:35 pm
Posts: 15
Location: Italy
Hi, i've made a simple app to talk with my asterisk PBX.
The app has a ServerSocket that listen on a tcp port, waiting for calling by my CRM (so from my customers data i can
place directly the call on the ip phone).
The app has no windows, but only a menu icon on the top bar (like dropbox,volume control and so on), build with MBS NSstatusitem plugins)
It works flawless with carbon target, instead, on the cocoa side, it doesn't listen until i click on the app and get it frontmost in some way, then it
works as aspected.

any suggestion?

i don't know what type of testing i can make to find the problem.


Top
 Profile  
Reply with quote  
 Post subject: Re: problem with cocoa target and ServerSocket
PostPosted: Sun Jan 27, 2013 8:54 am 
Offline
User avatar

Joined: Tue Mar 14, 2006 2:35 pm
Posts: 52
Location: France
Hi,

Try to poll your socket in a timer.

See viewtopic.php?f=7&t=44884

_________________
http://www.filmotech.info


Top
 Profile  
Reply with quote  
 Post subject: Re: problem with cocoa target and ServerSocket
PostPosted: Mon Jan 28, 2013 2:44 am 
Offline

Joined: Thu Nov 25, 2010 9:35 am
Posts: 36
Location: France
Have you try put it in a thread ?

_________________
RS under Lion... OS Lion, MacBook Air 13" and Mini Server OS Lion Server.


Top
 Profile  
Reply with quote  
 Post subject: Re: problem with cocoa target and ServerSocket
PostPosted: Mon Jan 28, 2013 12:56 pm 
Offline

Joined: Tue Mar 23, 2010 8:44 pm
Posts: 673
Hi guys.

This seems to be a big Cocoa socketcore bug. I tested this using TCPsockets (not a serversocket as the OP in this thread and not an IPCsocket as the OP in the other linked thread).

Polling does seem to solve it (I just tested) but as the other poster in the other thread said it does induce a CPU hit.

Before polling your socket from the timer remember to check that it doesn't = nil.
Otherwise noobies may be scratching their heads as to why they're getting nil object exception errors.

If Window1.Cocoa_Listensocket<>nil then
Window1.Cocoa_Listensocket.poll
end


Has anyone filed a bug report?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group