added socket support

added socket support