but i am getting an error - connection timed out.
server address and port number is valid :-)
thanks in advance
The message is clear: timeout. Try to:
0) double check addresses
1) pre select the access point
2) if you have enough rights/permissions, check if you can see related frames in your network using some sniffer.
3 check firewalls on your server machine
4) check firewalls on your wifi router
5) show (if you can) the server code