Re: send-receive using CSocket



mayara wrote:
> hi everyone .i`m doing a project for capturing the
> desktop image & sending it from server to client " i convert it to DIB
> then send the buffer of DIB using TCP " when i try to do a
> StretchBIBits on client the image is not so complete it has some
> missing pieces
> think the problem may be in my send-receive code.can u help me with a
> strong and reliable send-receive code??

First off: You may want to stop using CSocket, as it has problems. Take
a look at CAsyncSocket and try using that.

Second off: Is your image a constant size buffer? If not, how do you
know the exact dimensions of the image?

What kind of package are you transmitting across the buffer? Just the
image buffer? Or are you also transmitting height, width, color
information, etc. If you are transmitting more information, are you
receiving all of it, or just part of it, or is it invalid?

Josh McFarlane

.



Relevant Pages

  • Re: send-receive using CSocket
    ... Be aware that if you send a buffer, that the receive does not receive the same information ... >> strong and reliable send-receive code?? ... Or are you also transmitting height, width, color ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: Socket write behaviour is inconsistent?
    ... copy 1 byte to buffer, copy many bytes to buffer, copy one byte to ... Then why did you write "the client throws an error"? ... remote endpoint for your connection. ... When the response is sent using the first chunk of code, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: TCPClient Synchronous or Asynchronous Writes
    ... acting as the "server" receives quality assurance data from different ... Each client can register to look at differnt data so there ... is actually a Circular Buffer for each client. ... >> stream data to my clients over a TCPClient connection. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: NIO best practice
    ... ByteBuffer buffer) { ... SelectionKey key=client.keyFor; ... ChannelState state=selkey.attachment; ... transfer_file(selkey, client, state); ...
    (comp.lang.java.programmer)
  • Re: TCPClient Synchronous or Asynchronous Writes
    ... there's no guarantee the first packet of data ... post it off to the client every few seconds in one block. ... > stream data to my clients over a TCPClient connection. ... > On the server I have a custom circular data buffer that receives byte ...
    (microsoft.public.dotnet.languages.csharp)