How do I read a stream (using Edanmo's OLE) and send the contents to a winsock?
Eg something like Winsock1.Sendata MyStream.read (pv,cb) Is this correct but what do I put in the pv & cbs ?
Background: (thanks to a lot of help from strongm)
I have a network setup working that successfully sends frames from a web camera at each of 16 workstations to a master server and displays 16 small pictures on the server.
A frame is sent whenever there is movement in front of the web camera.
The original web picture is 1 meg but I cut it down to a below 30k JPG to greatly reduce the network traffic. With barely visible degradation of the picture.
I use a stream to accumulate the 8k chunks of picture bytes received by the server winsocks and use GDI to send this to an image box.
My new challenge is to create 2 new remote control workstations to receive a copy of each picture when it changes directly from the server. The network connection to the original pic source is only 100mhz while the link between the server and new remote controls is 1ghz and both are high speed i7's so I don't want to have the original sources sending each pic three times.
So I want to relay only the small data from the server containing the jpg and not the full reconstituted larger picture at the server therefore I need to get a copy of the stream as it is received at the server and resend to the remote controllers.
I could accumulate the pic byte data from the winsock and just resend it but this is too slow.
If I could read the whole stream once it was received I think this would do the trick.
I cant find any info on how to set up the read statement.
The old read stream was simply MStream.Read (No of Bytes) but what do you use with Edanmo's stream and is this in the same form as the original byte data written to the stream?
Eg something like Winsock1.Sendata MyStream.read (pv,cb) Is this correct but what do I put in the pv & cbs ?
Background: (thanks to a lot of help from strongm)
I have a network setup working that successfully sends frames from a web camera at each of 16 workstations to a master server and displays 16 small pictures on the server.
A frame is sent whenever there is movement in front of the web camera.
The original web picture is 1 meg but I cut it down to a below 30k JPG to greatly reduce the network traffic. With barely visible degradation of the picture.
I use a stream to accumulate the 8k chunks of picture bytes received by the server winsocks and use GDI to send this to an image box.
My new challenge is to create 2 new remote control workstations to receive a copy of each picture when it changes directly from the server. The network connection to the original pic source is only 100mhz while the link between the server and new remote controls is 1ghz and both are high speed i7's so I don't want to have the original sources sending each pic three times.
So I want to relay only the small data from the server containing the jpg and not the full reconstituted larger picture at the server therefore I need to get a copy of the stream as it is received at the server and resend to the remote controllers.
I could accumulate the pic byte data from the winsock and just resend it but this is too slow.
If I could read the whole stream once it was received I think this would do the trick.
I cant find any info on how to set up the read statement.
The old read stream was simply MStream.Read (No of Bytes) but what do you use with Edanmo's stream and is this in the same form as the original byte data written to the stream?