make queue & socket global