I'm learning socket programming in Unix. My jobs is sending some frames over TCP/IP Client-Server model, ex Hello, Ack, Bye packets. Each frames have a ID field, which helps we know which packet the server/client received. For example, 1 for Hello, 2 for Ack and 3 for Bye. I use struct in C to create frames, one struct per frame, so I have 3 structs: Hello, Ack and Byte for both Client and Server. But I got a problem. How the receiver know which packet it receive ?