Re: advices on sockets
- From: mast4as <mast4as@xxxxxxxxx>
- Date: Tue, 18 Mar 2008 15:55:40 -0700 (PDT)
It sounds to me like you only intend to run the "server" and "clients"
on the same computer. Is this correct? If this is what you intend, why
not just have your application display an X window, and then start
multiple threads, each that render part of the graphic? Then you don't
have to deal with sockets at all.
Well that's how it worked at the beginning. The main advantage of
having a socket system is that you can render a frame, display the
result in the xwindow, then start another frame later, and get the
second image displayed in the same window. Eventually if you have kept
the result in the memory of the xwindow app, you can swap between the
2. The only way i have found to get that to work, was by making 2
separate applications and have them communicate by sockets. This way
when the graphic app is done processing a frame (and exit), the
xwindow stays on the screen and is ready for the next process which
you might start by running the graphic app again.
For now, I am running it on the same computer you are right, because I
am testing it on my computer, but if that project evolves the way it
should i might consider using it to display the result of a frame
which is net-rendered by several machines connected by a network. The
server becomes your local computer, eventually, and dispatch the work
to the clients... once bits of images are rendered by the clients they
are displayed to the screen.
Again if you think threads are a better way, I am interested in
looking into that. I am particularly fond of sockets. In particular if
it works well like the prototype i wrote seems to show, it doesn't
seem to me the most reliable technique. Even though I have seen it
running in many places without any problem at all.
If you more suggestion or thinl i can implement what i need with
threads, please let me know.
thanks -c
.
- References:
- advices on sockets
- From: mast4as
- Re: advices on sockets
- From: jason.cipriani@xxxxxxxxx
- Re: advices on sockets
- From: jason.cipriani@xxxxxxxxx
- advices on sockets
- Prev by Date: Re: pid_t data type
- Next by Date: Re: pid_t data type
- Previous by thread: Re: advices on sockets
- Next by thread: advices on sockets
- Index(es):
Relevant Pages
|