added socket read timeout
updated interface to set timeout