improve socket relay