I'm implementing a Silverlight application that uses Sockets to receive data that is pushed to it from a Socket Server. (Silverlight only supports the TCP protocol)
The Socket Server pushes a series of images to the Silverlight application which displays them. Every 2 seconds the next image in the series is sent until all of the images have been sent, at which time the Socket Server just starts over again.
Everything's working fine right now but that's only because I've made the receive buffer size for the SocketAsyncEven tArgs large enough to accept the whole image file.
When the receive buffer size is smaller than the file more than one packet is sent from the server to the client until the whole file's been sent.
My question is: how do I know how large the file is that's being sent?
Thanks for your time,
-Frinny
The Socket Server pushes a series of images to the Silverlight application which displays them. Every 2 seconds the next image in the series is sent until all of the images have been sent, at which time the Socket Server just starts over again.
Everything's working fine right now but that's only because I've made the receive buffer size for the SocketAsyncEven tArgs large enough to accept the whole image file.
When the receive buffer size is smaller than the file more than one packet is sent from the server to the client until the whole file's been sent.
My question is: how do I know how large the file is that's being sent?
Thanks for your time,
-Frinny
Comment