Port Stream and Socket components to use new loop prototype