Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, March 2008
QTcpServer on Mac


Message 1 in thread

I just noticed an odd thing and wondering if its expected or something  
I'm doing wrong.  I have a program using QTcpServer (Qt 4.3.3) and it  
calls listen using QHostAddress::Any and a port.  On Linux if I run  
the application again while its already running, the listen call  
returns false indicating its an error and I use this to make sure two  
servers aren't running at once.  On the Mac though (10.5.2), the  
listen call doesn't return false and I end up being able to start two  
of my servers.

In the end its not really a problem since the client always seems to  
connect to the first server that was started but it can cause a  
problem if a server is running in the background and you try to start  
one yourself.

Is this expected behaviour on the Mac and something in how their  
sockets library works?

--
 [ signature omitted ] 

Message 2 in thread

Brad Pepers wrote:
>In the end its not really a problem since the client always seems to  
>connect to the first server that was started but it can cause a  
>problem if a server is running in the background and you try to start  
>one yourself.
>
>Is this expected behaviour on the Mac and something in how their  
>sockets library works?

That's not what I would expect. I will investigate further.

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.