On 2013.04.25 18:35, Hasil Sharma wrote: > Hi everyone , > How to reassemble the TCP data packets into objects viz. html , css , js > image files etc . I have no idea how to implement it using python , please > help ? TCP packets don't need to be reassembled. If your application receives TCP packets out of order, there is a problem with your networking equipment (or possibly the TCP stack in your OS). I suspect that you actually mean that you want distinct bytes objects that represent specific data. Sockets will give you a stream of bytes; how the data is separated is defined by the protocol. If you are dealing with HTTP, it is much better to use an HTTP client library than raw sockets. In fact, there are many libraries available for many different protocols, which are a better choice than dealing with sockets directly for all but the simplest protocols. You'll get a better answer if you tell us what the problem is and what you are trying to accomplish.
-- CPython 3.3.1 | Windows NT 6.2.9200 / FreeBSD 9.1 -- http://mail.python.org/mailman/listinfo/python-list