parse socketPort to int.