Disconnection

I’m not sure if I post this to the right place, but since I deal with IM Gateway only I post it here.

I have a flash based messenger which works via IMGateway and I met a strange problem. If nothing has been sent/received during a period of time (like few minutes) the connection drops. Is it normal ? If so is there any “ping” command to keep the connection?

Thanks