Exemple #1
0
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())
}
Exemple #2
0
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())
}