socket connection with or without ssl added and intial server message parsing