Adapt socket to be injected