Added base stream_engine.rs, make SocketBase to exit on only critical
closed endpoints.