Skip to content

Commit

Permalink
doc: server hello message
Browse files Browse the repository at this point in the history
  • Loading branch information
EagleoutIce committed Sep 1, 2023
1 parent e442c30 commit 7f6edb4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/cli/repl/commands/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ import { guard } from '../../../util/assert'

type Version = `${number}.${number}.${number}`

/**
* Describes the version of flowR and the used R interpreter.
*/
export interface VersionInformation {
/** The version of flowR */
flowr: Version,
/** The version of R identified by the underlying {@link RShell} */
r: Version | 'unknown'
}

Expand Down
13 changes: 12 additions & 1 deletion src/cli/repl/server/messages/hello.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import { VersionInformation } from '../../commands/version'
import { FlowrBaseMessage } from './messages'

/**
* The hello message is automatically send by the sever upon connection.
*/
export interface FlowrHelloResponseMessage extends FlowrBaseMessage {
type: 'hello',
/** The hello message never has an id, it is always undefined */
id: undefined,
/** a unique name assigned to each client it has no semantic meaning and is only used for debugging */
/**
* A unique name that is assigned to each client.
* It has no semantic meaning and is only used/useful for debugging.
*/
clientName: string,
/**
* Describes which versions are in use on the server.
* @see VersionInformation
*/
versions: VersionInformation
}

0 comments on commit 7f6edb4

Please sign in to comment.