Change socket API