add sort for sockets