drewdaman
February 9th, 2005, 10:59 AM
hello..
i have some general issues i need some advice with. i'm not going to implement this right away, but would like to know how to do some of this stuff because i should keep it in mind while doing some more of the "basic grunt" work.
i have mutilple camclient, a single multithreaded server adn multiple clients. the camclients are comptuers with webcams. the server is a central poitn: both camclients and clients connect to it.
also, i have not yet made teh server multithreaded. i will do this later on. was told by teh boss to hold off on this for right now! so.. maybe its just that i'm still confused about multithreading.. but i think my questions are valid!
the camclients receive a request to transmit. when this request is received, a stream from a webcam should be transmitted to the server. my question is... if there are mulitiple clients who request a stream from the same camclient, how can i coordinate the client threads, so the camcleitn only sends the stream once. the same info being received from a particular camclient has to be sent to two different locations from different threads. in other words, it would be a waste to have two different sockets receiving the same info at the server. i would need two sockets to send out the stream, but not to receive.
also, once the streaming starts, and hte client wants to abort... i would like to send a message to the server. but the server is just sending continuously. can i use select or something to see if there is an incoming message while i'm sendnig in a loop?
thanks!
drew.
i have some general issues i need some advice with. i'm not going to implement this right away, but would like to know how to do some of this stuff because i should keep it in mind while doing some more of the "basic grunt" work.
i have mutilple camclient, a single multithreaded server adn multiple clients. the camclients are comptuers with webcams. the server is a central poitn: both camclients and clients connect to it.
also, i have not yet made teh server multithreaded. i will do this later on. was told by teh boss to hold off on this for right now! so.. maybe its just that i'm still confused about multithreading.. but i think my questions are valid!
the camclients receive a request to transmit. when this request is received, a stream from a webcam should be transmitted to the server. my question is... if there are mulitiple clients who request a stream from the same camclient, how can i coordinate the client threads, so the camcleitn only sends the stream once. the same info being received from a particular camclient has to be sent to two different locations from different threads. in other words, it would be a waste to have two different sockets receiving the same info at the server. i would need two sockets to send out the stream, but not to receive.
also, once the streaming starts, and hte client wants to abort... i would like to send a message to the server. but the server is just sending continuously. can i use select or something to see if there is an incoming message while i'm sendnig in a loop?
thanks!
drew.