My understanding is that MIDP1.0 requires only http to be implemented. And with http, there is no way for a server to initiate a connection to a client. With this restriction, am curious to find out how some of the other developers manage to implement an instant messaging client.
To expand further, there is no IP address associated with a mobile handset. How can a server contact a client.
Polling is the only viable answer. The client requests updates (with an http request, of course) from the server every x seconds.
Some phones support sockets, but polling is the only truly portable way to achieve this for now.
Holding an http connection open doesn't work on Series 40, only on Series 60. We have an IM client for MSN (and Yahoo) and most of the problems we faced were on Series 40 and the intervention of the operator's WAP gateway. Still, it *can* be done, just takes lots of coffee and piza :-)