How to send data in the form of packet through sockets in C. I have made a structure variable which contains variables(data) corresponding to the packet fields. Now how to send this structure data through sockets to receiver Please help me out. Thanks.