Packetize data to send it over tcp sockets

Hello All,
I am very new to socket programming and client server architecture. I have to write a client which will send some data to server and server will display it on its console. I am ready with both client and server but my problem is with packetizing of data --

I have structure which contains info to be sent to server. It looks like below --

typedef struct wordInfo
{
    int lineNo;
    int wordCnt;
    struct wordInfo *next;
}wordStats;

typedef struct Info
{
	char word[MAX_LENGTH];
        int totoalCount;
        wordStats pwHead[10];
}sharedInfo;

    sharedInfo shinfo[15];   
My question is how can I send this info to server so that it will interpret this info as I wanted \--

TCP is a reliable stream with no packet borders, so you need to write a protocol to run inside it that defines packet size at least, if you need to recover the packets. Otherwise, just treat it like a pipe/FIFO, but bidirectional. The main trick in TCP protocols is to make sure both ends are not just reading or just sending, as that is a lockup. If you have threads or poll/select() controlled I/O then that is less of a problem (you are both reading and writing both ends all the time).