Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement WebSocket #44

Merged
merged 9 commits into from
Aug 24, 2021
Merged

Implement WebSocket #44

merged 9 commits into from
Aug 24, 2021

Conversation

ya7on
Copy link
Member

@ya7on ya7on commented Jul 3, 2021

No description provided.

@ya7on ya7on marked this pull request as ready for review July 11, 2021 14:24
@ya7on ya7on requested a review from tmcgroul July 11, 2021 14:24
src/websocket.ts Outdated
data: any,
}

export type EventTypes = 'LOGS' | 'SERVERS'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

может лучше enum тут использовать?

// TODO https://github.com/donkey-engine/donkey-engine-ui/issues/45

const wsClient = getClient()
wsClient.on('SERVERS', (data) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а если 2 раза поменять статус, то в eventHandlers будет 2 колбэка на любое изменение в серверах?
а если у нас уничтожится компонент и коллбэк попробует поменять у него this.pending?

@ya7on ya7on requested a review from tmcgroul July 19, 2021 18:44
@@ -137,18 +138,19 @@ export default defineComponent({
}
}
},
created() {
const wsClient = getClient()
wsClient.on(EventTypes.SERVERS, (data) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нет отписки от события

@ya7on ya7on merged commit dd5fbdb into master Aug 24, 2021
@ya7on ya7on deleted the add_realtime branch August 24, 2021 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants