-
Notifications
You must be signed in to change notification settings - Fork 0
/
bufferflow.go
49 lines (43 loc) · 1.73 KB
/
bufferflow.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package main
import (
//"log"
//"time"
)
var availableBufferAlgorithms = []string{"default", "timed", "timedraw"}
type BufferMsg struct {
Cmd string
Port string
TriggeringResponse string
//Desc string
//Desc string
}
type Bufferflow interface {
Init()
BlockUntilReady(cmd string, id string) (bool, bool) // implement this method
//JustQueue(cmd string, id string) bool // implement this method
OnIncomingData(data string) // implement this method
ClearOutSemaphore() // implement this method
BreakApartCommands(cmd string) []string // implement this method
Pause() // implement this method
Unpause() // implement this method
SeeIfSpecificCommandsShouldSkipBuffer(cmd string) bool // implement this method
SeeIfSpecificCommandsShouldPauseBuffer(cmd string) bool // implement this method
SeeIfSpecificCommandsShouldUnpauseBuffer(cmd string) bool // implement this method
SeeIfSpecificCommandsShouldWipeBuffer(cmd string) bool // implement this method
SeeIfSpecificCommandsReturnNoResponse(cmd string) bool // implement this method
ReleaseLock() // implement this method
IsBufferGloballySendingBackIncomingData() bool // implement this method
Close() // implement this method
}
/*data packets returned to client*/
type DataCmdComplete struct {
Cmd string
Id string
P string
BufSize int `json:"-"`
D string `json:"-"`
}
type DataPerLine struct {
P string
D string
}