socket API works