471,108 Members | 1,557 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

Creating and sending a packet via a socket

I have created a Packet as a structure. i am not able to send the packet through the send() because what i have understood it sends only strings. Is there any way to send the packet as a structure itself??
Basically i want to know how to send a packet via socket connection?
Mar 30 '08 #1
1 2364
dazzler
75
I have created a Packet as a structure. i am not able to send the packet through the send() because what i have understood it sends only strings. Is there any way to send the packet as a structure itself??
Basically i want to know how to send a packet via socket connection?
hmmh, try using pickle module , google for it ;)

pickle the data, which converts it to string and then send it. and the receiver can unpickle it then from the string... I don't have tried pickle but I think that it might work like that
Mar 31 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by johnny.karlsson | last post: by
2 posts views Thread by bobrics | last post: by
7 posts views Thread by D. Patrick | last post: by
10 posts views Thread by Martin Bürkle | last post: by
9 posts views Thread by thorley | last post: by
9 posts views Thread by Miro | last post: by
6 posts views Thread by White Spirit | last post: by
reply views Thread by cornish.julia | last post: by
3 posts views Thread by kardon33 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.