created server socket and thread.