Adding reliable socket connection