Is there any way of setting the timeout value on a socket connection? I have created my connection like so:
connection = (SocketConnection) Connector.open( url, Connector.READ_WRITE, true );
Where true should enable timeout exceptions, but I never see them. If I try to make a connection to a machine that doesn't give a response I have to wait about 2 or 3 minutes, and then I get a null pointer exception.
Can I explicity set the timeout? If not I guess I am going to have to manually have a timer that cancels the connection after the given time.