Beispiel #1
0
func NewWebHttpView(ctl *ui.Controller, proto *proto.Http) *WebHttpView {
	w := &WebHttpView{
		ctl:          ctl,
		httpProto:    proto,
		idToTxn:      make(map[string]*WebHttpTxn),
		HttpRequests: util.NewRing(20),
	}
	go w.update()
	w.register()
	return w
}
Beispiel #2
0
func newTermHttpView(ctl mvc.Controller, termView *TermView, proto *proto.Http, x, y int) *HttpView {
	v := &HttpView{
		httpProto:    proto,
		HttpRequests: util.NewRing(size),
		area:         NewArea(x, y, 70, size+5),
		shutdown:     make(chan int),
		termView:     termView,
		Logger:       log.NewPrefixLogger("view", "term", "http"),
	}
	ctl.Go(v.Run)
	return v
}
Beispiel #3
0
Datei: http.go Projekt: 40a/ngrok
func newWebHttpView(ctl mvc.Controller, wv *WebView, proto *proto.Http) *WebHttpView {
	whv := &WebHttpView{
		Logger:       log.NewPrefixLogger("view", "web", "http"),
		webview:      wv,
		ctl:          ctl,
		httpProto:    proto,
		idToTxn:      make(map[string]*SerializedTxn),
		HttpRequests: util.NewRing(20),
	}
	ctl.Go(whv.updateHttp)
	whv.register()
	return whv
}
Beispiel #4
0
func NewHttp(proto *proto.Http, shutdown chan int, x, y int) *HttpView {
	v := &HttpView{
		httpProto:    proto,
		HttpRequests: util.NewRing(size),
		area:         NewArea(x, y, 70, size+5),
		shutdown:     shutdown,
		Logger:       log.NewPrefixLogger(),
	}
	v.AddLogPrefix("view")
	v.AddLogPrefix("term")
	v.AddLogPrefix("http")
	go v.Run()
	return v
}
Beispiel #5
0
func NewWebHttpView(wv *WebView, ctl *ui.Controller, proto *proto.Http) *WebHttpView {
	w := &WebHttpView{
		webview:      wv,
		ctl:          ctl,
		httpProto:    proto,
		idToTxn:      make(map[string]*SerializedTxn),
		updates:      ctl.Updates.Reg(),
		state:        make(chan SerializedUiState),
		HttpRequests: util.NewRing(20),
	}
	go w.updateHttp()
	go w.updateUiState()
	w.register()
	return w
}