NMS-6088 use socket libraries when necessary