forget sockets, let's make an API.