//..............................................................................
//
// The example below works as a simple echo-server. Whatever is received, is
// sent back immediately. Here we use 'onLogRecord' as a way to get notified
// about session events, and we handle 'log.StdRecordCode.Rx' to transmit every
// RX packet back.
//
//..............................................................................

void onLogRecord(
	uint64_t timestamp,
	uint64_t recordCode,
	void const* p,
	size_t size
) {
	if (recordCode == log.StdRecordCode.Rx)
		transmit(p, size);
}
