Hello krishnaraoveera1294 and welcome to the Java Programming Forums.

I have uploaded some example code for you which is exactly what you are looking for.

This network application runs on 2...