Forum > Networking and Web Programming

lnet - TCP server-client problem under linux



I've ran into a problem using lNet TCP connection. I have a server and a client connected via TCP protocol. Under ubuntu 10.04 i386 the server senses when the client connects through OnConnect action but when the client disconnects nothing happens although the OnDisconnect event is also used... I've tried the same programs under windows XP and there were no such problems; the server sensed when the client disconnected and vice versa. Everything is written according to the example programs...

I don't know if it's a linux or ubuntu specialty or an lNet bug.


AFAIK you MUST have an OnReceive-event and you MUST read data here, although there may be nothing to read. Only then other events are fired. Again: AFAIK.


Exactly as John says, you MUST have OnReceive and do a .Get or .GetMessage inside when called. This is because lNet has NO internal buffers and disconnects (from the other side) are reported by the kernel via recv() calls which give 0 result.


[0] Message Index

Go to full version