added socket api