try {
SocketConnect sc1 = new SocketConnect(first, second);
SocketConnect sc2 = new SocketConnect(second, first);
try {
sc1.join();
} catch (InterruptedException e) {
}
try {
sc2.join();
} catch (InterruptedException e) {
}
} catch (IOException e) {
e.printStackTrace();
}