Thank you very much for the reply. Can pickle work directly with socket? The way I am doing right now is to pickle the object to a file then send the file content through the socket.