示例#1
0
文件: sender.go 项目: jimlloyd/mbus
func (sender *Sender) serveRequest(request packet.Packet) {
	// We'll eventually respond to requests, but for now just log them.
	var h header.RequestHeader
	_, err := h.Decode(request.Data)
	if err != nil {
		fmt.Println("Failed to decode request. Err:", err)
	}

	fmt.Println("Received request", h.Verb, "from remote:", request.Remote())
}
示例#2
0
文件: sender.go 项目: jimlloyd/mbus
func (sender *Sender) serveResponse(response packet.Packet) {
	// We'll eventually respond to responses, but for now just log them.
	fmt.Println("Received response from remote:", response.Remote())
}