Hi all,

long time no see laugh
Well dont think anyone remembers me around here anymore, anyway im around just not posting, been busy...

Onto my question laugh
Been working with UDP and stuff works as I want it to, trying to move to TCP got into "small" problem. TCP sees its connections as streams, meaning when u send 2 packets they might not arrive as 2 packets but rather as 1 combined. UDP sends packets as u construct them.

So, a bit of phyton, server side:
Code:
I:\>servertcp.py
Creating server socket...
Wait for client...
Client connected: ('192.168.248.27', 4042)
Recieved from client:  Whatever dude...
Recieved from client:  Whatever dude...
Recieved from client:  Whatever dude...Whatever dude...Whatever dude...
Recieved from client:  No more



And client:
Code:
I:\>clienttcp
Creating client socket...
Connecting to server
Connected to server, sleeping for 5 sec.
Sending message...
Sending message...
Sending message...
Sending message...
Sending message...
sending last one



So the problem is obvius (or not laugh ) the server recived packets 3,4,5 as 1 combined packet even tough client sent them separately. Or should I say they were created separately but TCP/IP stack waited, packed 3 into one and sent them as one.

Anyone know a "trick" to make TCP behave as UDP on that matter; to send packets one by one?