swing - In java socket programming, is it necessary to run server program first before client program? -
i building remote desktop viewer app using swing. when run server first , client, app working fine.
but when run client first , server, client gives exceptions there no listening server.
what should if run client first , server connection should successful , client should not give exceptions?
thanks.
connectexception
thrown when client tries connect server not started. have retry logic using
try{ socket.connect(..) }catch(connectexception ex) { }
within loop. delay can added between retry free cpu.
Comments
Post a Comment