pre-parse labels into socket descriptors as a first step for issue #232