Board index » delphi » Sending and receving a record structure using SendBuf and ReceiveBuf
Wayne Jones
![]() Delphi Developer |
Sun, 03 Oct 2004 07:51:29 GMT
|
Wayne Jones
![]() Delphi Developer |
Sun, 03 Oct 2004 07:51:29 GMT
Sending and receving a record structure using SendBuf and ReceiveBuf
Hi,
Can anyone breifly explain the best way to send and receive data held in a Any help or explainations would be greatly appreciated. Cheers Wayne |
M. van Renswoud
![]() Delphi Developer |
Sun, 03 Oct 2004 20:58:29 GMT
Re:Sending and receving a record structure using SendBuf and ReceiveBufThe way I handle it: send a record as a kind of header with some basic information about the type of message being sent and the size of the remaining data, then send the string seperately. The other end first receives the header and can use the size specified in the header to get the string back correctly without having to define a fixed-size string... Quote"Wayne Jones" <jugs_of_ju...@tomgreen.com> wrote in message Hi, Can anyone breifly explain the best way to send and receive data held in a Any help or explainations would be greatly appreciated. Cheers Wayne |
Charles Stac
![]() Delphi Developer |
Sun, 03 Oct 2004 22:30:52 GMT
Re:Sending and receving a record structure using SendBuf and ReceiveBufFew approaches: 1) Determine the size of the message and use the SendStreamWithSize methods. 2) Encode the structure using a versatile encoding format (like ASN.1/DER or 3) Write a custom transport protocol that combines #1 and #2 (i.e. send a While I prefer the second option for its versatility (i.e. you can encrypt I actually the third technique as I have a high peformance transport layer Cheers, Charles Quote"Wayne Jones" <jugs_of_ju...@tomgreen.com> wrote in message Quote> Hi, |
Wayne Jone
![]() Delphi Developer |
Mon, 04 Oct 2004 07:25:05 GMT
Re:Sending and receving a record structure using SendBuf and ReceiveBufThanks for both your replies :-) Quote"Wayne Jones" <jugs_of_ju...@tomgreen.com> wrote in message Quote> Hi, |
Olivier Dubuiss
![]() Delphi Developer |
Sun, 10 Oct 2004 18:07:31 GMT
Re:Sending and receving a record structure using SendBuf and ReceiveBufQuote"Charles Stack" <char...@codycomp.com> wrote in message <news:3cbd8713_1@dnews>... format such as DER or the compact PER (Packed Encoding Rules), or you can even generate an XML document by using XER (XML Encoding Rules). More information on ASN.1: http://asn1.elibel.tm.fr O. Dubuisson |
1. Problem with Socket SendBuf and ReceiveBuf
3. Accessing table records using record structures
4. ClientSocket SendBuf is not sending right away
5. QR Reporting using data in a Structure (record)
6. Sending and receive record using TServerSocket and TClientSocket
7. How to send records using Indy
8. TidSMTP.OnStatus not receving hsDisconnecting,hsDisconnected
9. Record Cloning or Insert New Record using data from currently selected record