Working on socket factory

Change-Id: I217a00d244b818616d91f18f47b7f57afaed5d4b