Update live connection handshake structure #70
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#67 Handle server live authentication inside WebSocket connection
luca0N/lanbassador
#69 Enhance live connection handshake interpretation in server
luca0N/lanbassador
Reference
luca0N/lanbassador!70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev_client_live_handshake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Introduce required live connection flow changes imposed by the changes
made to the server code in commits
e6353ca48aandb7f7f1dbf0, and refactor the serial packetrequest flow by keeping track of the current operation with an enum
named `LiveStage'.
5cb6da924ctoee97e0de5cLatest force-push removes an unused import and class variable.
ee97e0de5cto2a39e1f14cSome minor things to enhance the code quality before merging this pull request.
@ -55,3 +61,2 @@version: string;action: string;data: string | undefined;data: any;I would like for
datato actually refer to a generic typeTfor higher flexibility. Althoughanyis as permissive as it gets, we'd lack standard TypeScript safeguards.This will be done outside this pull request.
@ -93,18 +97,27 @@ interface LiveConnectionData {port: number;}enum LiveStage {Some inline documentation would do some good here.
@ -142,0 +162,4 @@let packetData = undefined;switch (this.liveStage) {case LiveStage.LIVE_STAGE_CLIENT_ACTION_HELLO:packetAction = "HELLO";These strings should likely be in the form of
consts, or as part of an enum which can be converted to strings as necessary. Having these values hardcoded throughout the code is prone to errors.@ -142,0 +180,4 @@if (packetData !== undefined)packet.data = packetData;this.ws?.send(JSON.stringify(packet));An
Errorshould be thrown ifthis.wsis null.