mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 10:22:19 +00:00
Comment telnet package
This commit is contained in:
parent
ee76951854
commit
95fcedf2fa
@ -9,6 +9,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// TODO Config should not be exported
|
||||
// Cfg contains the different options of the telnet package, see below
|
||||
Cfg *Options
|
||||
currentMessage *string
|
||||
)
|
||||
@ -22,6 +24,7 @@ type Options struct {
|
||||
Delay int
|
||||
}
|
||||
|
||||
// Serve starts the telnet server and listen to clients
|
||||
func Serve(config *Options) {
|
||||
Cfg = config
|
||||
|
||||
@ -70,7 +73,7 @@ func asciiChar(pixel byte) string {
|
||||
return asciiChars[(255-pixel)/23]
|
||||
}
|
||||
|
||||
// ServeAsciiArt starts a telnet server that send all packets as ASCII Art
|
||||
// ServeAsciiArt send all packets received by ffmpeg as ASCII Art to telnet clients
|
||||
func ServeAsciiArt(reader io.ReadCloser) {
|
||||
if !Cfg.Enabled {
|
||||
_ = reader.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user