Setting up a TCP server on esp8266, are received packets complete?

I am setting up a tcp server on a specific port on my ESP-07 module to handle configuration of the unit.
The idea is to send packets of data to this port from a Windows configuration application.
It will send a complete command over tcp/ip and each contains a function identifier followed by data.
Each packet would be max 50 bytes or so, more commonly less than 10.
Do I have to take into account split packets? I.e can a packet this small be divided into two separate receptions?
If I can assume a complete packet then I don't have to fix some kind of persistent data stored in a global char array which will be filled with incoming data until it gets complete by successive receptions and can be acted on.
Instead if there are data they can be sent to the config handler for processing directly.
Should be simpler.

Do I have to take into account split packets?

Yes.

I.e can a packet this small be divided into two separate receptions?

It's good coding practice to assume nothing (about whether a packet can, or will, be split).

my opinion: simpler is to use the global buffer to collect the data. the loop() can loop without handling if the new client has data or wait for all data. collecting the bytes and checking for end marker or know count of bytes is simpler.

I have created the following:

  1. A struct buffer with position counter:
#define BUFSIZE 80
typedef struct
{
	int pos;	    //Position of next char to write
	char buf[BUFSIZE];  //Comm buffer, probably too big
}ConfigBuffert;

extern ConfigBuffert CmdBuf;
  1. A global buffer and a func to add data to it:
ConfigBuffert CmdBuf;   //Command buffer where incoming data are stuffed until ETX
int AddDataToCmdbuf(char *buf, int len)
/************************************************************************
 * Add data into the CmdBuf.buf array. 
 * Return 1 if ETX found, 0 if data added and -1 if end of buffer reached
 ************************************************************************/
{
	char c;
	int res = 0;
	
	for (int i=0; i < len; ++i)
	{
		c = *buf++;
		CmdBuf.buf[CmdBuf.pos++] = c;
		if (c == ETX) res = 1;
		if(CmdBuf.pos >= BUFSIZE) //End of buf reached
		{
			res = -1;
			break;
		}
	}
	return res;
}
  1. Now I am writing the handler which receives the data from the loop().
    It will first stuff the received data into the buffer using AddDataToCmdbuf() and depending on the returned value it will either report an error or process the found command depending on overrun or ETX found. And if none of this happened it will just return to the loop.
void ProcessConfigCall(char *buf, int len)
{
	int res;
	res = AddDataToCmdbuf(buf, len);
	switch (res){
	case -1:
		ReplyError();
                ResetBuffer();
		return;
	case 0:
		return;
	case 1:	//Full command detected so extract it and process request
	{
		RespondToCommand(PopCommand());
	}
}

I think this will cover packet division and other problems.

Are you certain that packet reassembly, request for retransmission and all that stuff is not already handled at the TCPIP stack layer. It is rather odd that such a low level activity must be handled in an application program. Normally a TCPIP packet can be 1500 bytes long ,depending on the MTU setting of all the network devices in the path.

#define BUFSIZE 80
typedef struct
{
	int pos;	   //Position of next char to write
	char buf[BUFSIZE];  //Comm buffer, probably too big

If an 80 element array is probably too big, why do you need a signed int to hold the position to write to? Are you planning to write to the -34th position? To the 2387th position?