gotty/webtty/message_types.go

34 lines
781 B
Go
Raw Normal View History

2017-02-25 22:37:07 +00:00
package webtty
2017-08-24 05:40:28 +00:00
// Protocols defines the name of this protocol,
// which is supposed to be used to the subprotocol of Websockt streams.
2017-02-25 22:37:07 +00:00
var Protocols = []string{"webtty"}
const (
// Unknown message type, maybe sent by a bug
UnknownInput = '0'
// User input typically from a keyboard
Input = '1'
// Ping to the server
Ping = '2'
// Notify that the browser size has been changed
ResizeTerminal = '3'
)
const (
// Unknown message type, maybe set by a bug
UnknownOutput = '0'
// Normal output to the terminal
Output = '1'
// Pong to the browser
Pong = '2'
// Set window title of the terminal
SetWindowTitle = '3'
// Set terminal preference
SetPreferences = '4'
// Make terminal to reconnect
SetReconnect = '5'
// Set the input buffer size
SetBufferSize = '6'
2017-02-25 22:37:07 +00:00
)