Пример #1
0
func ShowRunParms(exampid string) {
	llu.Printf("%sHOST:%v\n", exampid, os.Getenv("STOMP_HOST"))
	llu.Printf("%sPORT:%v\n", exampid, os.Getenv("STOMP_PORT"))
	llu.Printf("%sPROTOCOL:%v\n", exampid, senv.Protocol())
	llu.Printf("%sVHOST:%v\n", exampid, senv.Vhost())
	llu.Printf("%sNQS:%v\n", exampid, Nqs())
	llu.Printf("%sNMSGS:%v\n", exampid, senv.Nmsgs())
	llu.Printf("%sSUBCHANCAP:%v\n", exampid, senv.SubChanCap())
	llu.Printf("%sRECVFACT:%v\n", exampid, RecvFactor())
	llu.Printf("%sSENDFACT:%v\n", exampid, SendFactor())
	llu.Printf("%sRECVWAIT:%t\n", exampid, RecvWait())
	llu.Printf("%sSENDWAIT:%t\n", exampid, SendWait())
	llu.Printf("%sACKMODE:%v\n", exampid, AckMode())
}
Пример #2
0
// Provide connect headers
func ConnectHeaders() stompngo.Headers {
	h := stompngo.Headers{}
	l := senv.Login()
	if l != "" {
		h = h.Add("login", l)
	}
	pc := senv.Passcode()
	if pc != "" {
		h = h.Add("passcode", pc)
	}
	//
	p := senv.Protocol()
	if p != stompngo.SPL_10 { // 1.1 and 1.2
		h = h.Add("accept-version", p).Add("host", senv.Vhost())
		hb := senv.Heartbeats()
		if hb != "" {
			h = h.Add("heart-beat", hb)
		}
	}
	//

	return h
}