Updated the socket API.