Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Transfer binary data with TcpClient and TcpServer?

brunosanbrunosan Member Posts: 8
Hi,
I`m trying to transfer a large amount of binary data with TcpClient and Tcpserver. If anyone knows something about it, please, PLEASE help me.

Thanks,

Bruno Santos

Comments

  • zibadianzibadian Member Posts: 6,349
    : Hi,
    : I`m trying to transfer a large amount of binary data with TcpClient and Tcpserver. If anyone knows something about it, please, PLEASE help me.
    :
    : Thanks,
    :
    : Bruno Santos
    :
    :
    The TWinSocketStream looks like the perfect object for that. I never used it, so I cannot help you much. I would suggest that you first end an integer to indicate how much data you wish to send, so the receiver knows how much to expect. Then you can send the data. Assuming that the data is on disk, you should eb able use the CopyFrom() and a TFileStream as source.

    Hint: it might also be useful to set up some form of validation, like a CRC check. There are CRC sources for Delphi.
  • brunosanbrunosan Member Posts: 8
    : : Hi,
    : : I`m trying to transfer a large amount of binary data with TcpClient and Tcpserver. If anyone knows something about it, please, PLEASE help me.
    : :
    : : Thanks,
    : :
    : : Bruno Santos
    : :
    : :
    : The TWinSocketStream looks like the perfect object for that. I never used it, so I cannot help you much. I would suggest that you first end an integer to indicate how much data you wish to send, so the receiver knows how much to expect. Then you can send the data. Assuming that the data is on disk, you should eb able use the CopyFrom() and a TFileStream as source.
    :
    : Hint: it might also be useful to set up some form of validation, like a CRC check. There are CRC sources for Delphi.
    :

    How can I "end an integer to indicate how much data you wish to send" that you talking about?
  • zibadianzibadian Member Posts: 6,349
    : : : Hi,
    : : : I`m trying to transfer a large amount of binary data with TcpClient and Tcpserver. If anyone knows something about it, please, PLEASE help me.
    : : :
    : : : Thanks,
    : : :
    : : : Bruno Santos
    : : :
    : : :
    : : The TWinSocketStream looks like the perfect object for that. I never used it, so I cannot help you much. I would suggest that you first end an integer to indicate how much data you wish to send, so the receiver knows how much to expect. Then you can send the data. Assuming that the data is on disk, you should eb able use the CopyFrom() and a TFileStream as source.
    : :
    : : Hint: it might also be useful to set up some form of validation, like a CRC check. There are CRC sources for Delphi.
    : :
    :
    : How can I "end an integer to indicate how much data you wish to send" that you talking about?
    :
    That is a typo for "send".
Sign In or Register to comment.