forked from cyborg-client/Remap-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
30 lines (24 loc) · 834 Bytes
/
main.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
package main
import (
"fmt"
"github.com/cyborg-client/Remap-server/analysis"
"github.com/cyborg-client/Remap-server/datatypes"
"github.com/cyborg-client/Remap-server/websocketserver"
"github.com/cyborg-client/Remap-server/tcphttpclient"
)
func main() {
fmt.Println("Started application")
// Make channels
tcpDataStreamCh := make(chan tcphttpclient.Segment, 100)
clientRequestCh := make(chan datatypes.ClientRequest)
go tcphttpclient.Main(tcpDataStreamCh, clientRequestCh)
myReq := datatypes.ClientRequest{Request: datatypes.Start}
myReqS := datatypes.ClientRequest{Request: datatypes.Stop}
clientRequestCh <- myReqS
clientRequestCh <- myReq
//run data parser
timeStampChannel := make(chan []int64, 100)
go analysis.Main(timeStampChannel, tcpDataStreamCh)
go websocketserver.Main(timeStampChannel)
select {}
}