When i try to connect to serverIp its give error me ..............which is pasted above
So the exception tells you what the problem is: the server didn't answer. Have you got the correct ip address, or maybe there's a firewall blocking the connection. You can of course use a normak try/catch to handle the exception.