cache tecnology

hi all,
I writing tcp client programm and will hope within your help. So, me need any ideas which to do cache of the data for my client. The programm using raw-socket and take data from recv after that I've been set source and destinate, ip and port. I seem what I would use sequence from either tcp-packet, but me confused how to do this with retransmitted packets?
____
thanks everyone who help me.
http://www.cplusplus.com/forum/articles/1295/

Your question doesn't make any sense. You've given no context for the data you wish to cache, why you wish to cache it etc.
Well, either packet has a number of sequence while that number has a start and end values it packet. The packets might be took with required sequence on client-side, but it doesn't tolerate to do, because it's be misstated. Then I think what if I've been cache it's would be work try. The packets consist of the binary-data format which's in try sequence valuable information.
This isn't really a C++ question. However, ...

TCP sockets will not show you packet numbers. It provides a reliable communications link (that is it works or it fails) with out-of-band data support.

If you're caching at the application level, it would be sufficient to log the requests and replies as bytes.

If you want to log packets, you can use PCAP. That interface will allow you to see packets as they pass thru the link layer. If your machine or software can't keep up with the network stream, it will drop packets.

There's also a Windows port called WinPCAP.
Thank you very much kbw, but I use it already. I just to appealed anyone with took help to me doing cache. Suppose it not tcp or it not network pertaining question I ask, then I want be know how to do cache keep of this cause.
The trick is to determine whether to contact the server or not.

Web servers can ask for the HTTP header, which has the date of the content. The cache can compare that date with the date of its copy. If it's not out of date, it can read the content from a file (or wherever it stored it) and return that instead.

You'll need some way of determining whether contact the server or not. Without knowing what kind of data you're storing, it's difficult to tell.

I'm now sure what aspect of this you have difficulty with.
I refer to my original reply. You haven't given us sufficient context to offer advice.
Topic archived. No new replies allowed.