Hi. I have problem with my aplication. You must run it with argument 0(for server) and 1(for client).
I don't know why but it freezes on the ObjectInputStream constructors with Cipher streams. When I don't use
Cipher stream it works. When i have only ois = new ObjectInputStream(new CipherInputStream(s.getInputStream(), cipher2)); in the server and ous = new ObjectOutputStream(new CipherOutputStream(s.getOutputStream(), cipher2)); in the client it works too. What i'm doing wrong?
Thanks for your help and sorry for my english.
greetings for you all.
So, I didn't get this part. when you have already obtained a stream ous, then wy are you not using this stream and re-intializing it.
This must not produce any result.
Anyways, what's the output you are getting?
I think error is with this stream only.
First have a socket -> then obtain a stream -> use it to read/write.
Hope it helped.