<commit_before>package timestamp

import (
	"bytes"
	"fmt"
	"sync"

	"github.com/dedis/prifi/coconet"
)

type Client struct {
	name string
	Sns  map[string]*coconet.GoConn // sns I "work" with
	dir  *coconet.GoDirectory       // directory of connection with sns

	// client history maps request numbers to replies from TSServer
	// maybe at later phases we will want pair(reqno, TSServer) as key
	history map[SeqNo]TimeStampMessage
	reqno   SeqNo // next request number in communications with TSServer

	// maps response request numbers to channels confirming
	// where response confirmations are sent
	doneChan map[SeqNo]chan bool

	nRounds     int        // # of last round messages received in, as perceived by client
	curRoundSig []byte     // merkle tree root of last round
	roundChan   chan int   // round numberd are sent in as rounds change
	Mux         sync.Mutex // potentially coarse grained mutex
}

func (cli *Client) handleRequest(tsm *TimeStampMessage) {
	switch tsm.Type {
	default:
		fmt.Println("Message of unknown type")
	case StampReplyType:
		cli.ProcessStampReply(tsm)

	}
}

func (cli *Client) Listen() {
	for _, c := range cli.Sns {
		go func(c *coconet.GoConn) {<commit_msg>comments<commit_after>package timestamp

import (
	"bytes"
	"fmt"
	"sync"

	"github.com/dedis/prifi/coconet"
)

type Client struct {
	Mux sync.Mutex // coarse grained mutex

	name string
	Sns  map[string]*coconet.GoConn // Signing Nodes I "work" with
	dir  *coconet.GoDirectory       // directory of connection with sns

	// client history maps request numbers to replies from TSServer
	// maybe at later phases we will want pair(reqno, TSServer) as key
	history map[SeqNo]TimeStampMessage
	reqno   SeqNo // next request number in communications with TSServer

	// maps response request numbers to channels confirming
	// where response confirmations are sent
	doneChan map[SeqNo]chan bool

	nRounds     int      // # of last round messages received in, as perceived by client
	curRoundSig []byte   // merkle tree root of last round
	roundChan   chan int // round numberd are sent in as rounds change

}

func (cli *Client) handleRequest(tsm *TimeStampMessage) {
	switch tsm.Type {
	default:
		fmt.Println("Message of unknown type")
	case StampReplyType:
		cli.ProcessStampReply(tsm)

	}
}

func (cli *Client) Listen() {
	for _, c := range cli.Sns {
		go func(c *coconet.GoConn) {
{'fraction_non_alphanumeric': 0.08238755779739386, 'fraction_numerical': 0.0, 'mean_word_length': 3.5506692160611855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7445075', 'n_tokens_mistral': 786, 'n_tokens_neox': 752, 'n_words': 268}