|
@@ -115,17 +115,17 @@ type Door struct {
|
|
|
Config DropfileConfig
|
|
|
READFD int
|
|
|
WRITEFD int
|
|
|
- Disconnected bool // int32 // atomic bool // Has User disconnected/Hung up?
|
|
|
- TimeOut time.Time // Fixed point in time, when time expires
|
|
|
- StartTime time.Time // Time when User started door
|
|
|
- Pushback FIFOBuffer // Key buffer
|
|
|
- LastColor []int // Track the last color sent for restore color
|
|
|
- ReaderClosed bool // Reader close
|
|
|
- readerChannel chan ReaderData // Reading from the User
|
|
|
- readerMutex sync.Mutex // Reader close mutex
|
|
|
- ReaderCanClose bool // We can close the reader (in tests)
|
|
|
- WriterClosed bool // Writer closed
|
|
|
- writerChannel chan string // Writing to the User
|
|
|
+ Disconnected bool // int32 // atomic bool // Has User disconnected/Hung up?
|
|
|
+ TimeOut time.Time // Fixed point in time, when time expires
|
|
|
+ StartTime time.Time // Time when User started door
|
|
|
+ Pushback FIFOBuffer[rune] // Key buffer
|
|
|
+ LastColor []int // Track the last color sent for restore color
|
|
|
+ ReaderClosed bool // Reader close
|
|
|
+ readerChannel chan ReaderData // Reading from the User
|
|
|
+ readerMutex sync.Mutex // Reader close mutex
|
|
|
+ ReaderCanClose bool // We can close the reader (in tests)
|
|
|
+ WriterClosed bool // Writer closed
|
|
|
+ writerChannel chan string // Writing to the User
|
|
|
writerMutex sync.RWMutex
|
|
|
LastMouse []Mouse // Store Mouse information
|
|
|
LastCursor []CursorPos // Store Cursor pos information
|
|
@@ -358,7 +358,7 @@ func (d *Door) Detect() bool {
|
|
|
// detect terminal capabilities.
|
|
|
func (d *Door) Init(doorname string) {
|
|
|
var dropfile string
|
|
|
- d.Pushback = NewFIFOBuffer(5)
|
|
|
+ d.Pushback = NewFIFOBuffer[rune](5)
|
|
|
|
|
|
// Get path to binary, and chdir to it.
|
|
|
var binaryPath string
|