Working on socket connection.