我正在阅读rxjs
webSocket文档
import { webSocket } from 'rxjs/webSocket';
const wsSubject = webSocket({
url: 'ws://localhost:8081',
openObserver: {
next: () => {
console.log('connetion ok');
}
},
});
在说明中
openObserver NextObserver<Event> An Observer that watches when open events occur on the underlying web socket.
我的问题是什么是NextObserver,我们需要哪种情况?