Dave Tolls wrote:Your client is doing osw.write().
Your server is doing reader.readLine().
readLine will block (or keep reading) until it encounters a new line character, or the end of stream.
Neither of which are being sent.
Puspender Tanwar wrote:I wrote a code on the server which returns the server's current Date-Time. As of now, I just ran the java program on server's terminal(and kept the program running) and tested that from my local. But I don't think, this is the approach to achieve such things, as I cannot be sure if that program will keep on running on that server.
Paul Clapham wrote:But if you're going to be distributing a product and you want to build in a feature whereby it has a trial version and a full-featured version, then one would assume that money is involved. And if there's enough money involved that it actually matters, then you could certainly spend some of that money on a server which enforces the trial period. Or alternatively you could decide not to spend that money and assume that most people aren't going to fiddle with their computer's clock just to get around the trial period. Either would be a valid approach.
Paul Clapham wrote:However if you do decide to provide your own server, then you must make it reliable. Otherwise people who have paid for the full-featured version will be cheated when your server is not responding.