I am sending TCP packets via
EDIT : Number of packets in a streaming protocol like TCP depends on your network configurations. However this answer optimizes the use of sockets so that no overhead is added by the program in sense of number of transmitted packets.
If you are trying to get larger packets you should try to put all data on socket at once. You probably are dividing it to multiple packets yourself. Because of Nagle's algorithm of TCP, TCP stack will send available data to peer immediately. So if you put data on socket in multiple occasions the rest of the data will go to the next packet.
Or you can turn off Nagle's algorithm like this :