Simple tcpip question

I have a server running using basic tcpip command, like bind(),
accept(), I made the socket non-blocking by
using Fionbio value via Ioctl(), I put these piece of code into a timer,
this timer is one of the many widgets in a complex photon application. Is
this a safe way of receiving messaging
from my client… if the client send me messages at a faster rate than my
timer hits, would I losing those messages.?

or this server has to be in a separate executable running in a while (1)
to ensure the Server doesnt miss any
messages…? Then I use qnx’s IPC functions like send(), receive() to
notify my photon application any messages being receieve??

You should probably run your socket server in a seperate thread from the UI.
But using a timer as the basis for the frequency of checking for incomming
data is not a wise idea. Take a look at select(), this could be used to
make an event driven framework, which may fit better with your design.


Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>
“ran zhang” <rzhang@vamcointernational.com> wrote in message
news:a29c80$eik$1@inn.qnx.com

I have a server running using basic tcpip command, like bind(),
accept(), I made the socket non-blocking by
using Fionbio value via Ioctl(), I put these piece of code into a timer,
this timer is one of the many widgets in a complex photon application.
Is
this a safe way of receiving messaging
from my client… if the client send me messages at a faster rate than my
timer hits, would I losing those messages.?

or this server has to be in a separate executable running in a while
(1)
to ensure the Server doesnt miss any
messages…? Then I use qnx’s IPC functions like send(), receive() to
notify my photon application any messages being receieve??