<commit_before>package quic

import (
	"net"
)

type Conn struct {
	Socket  *net.Conn
	Window  *Window
	Streams map[uint32]*Stream
}

func NewConnection(socket *net.Conn) (conn *Conn) {
	conn = &Conn{
		Socket:  socket,
		Window:  NewWindow(),
		Streams: make(map[uint32]*Stream),
	}
	return conn
}

func (conn *Conn) NewStream(streamID uint32) {
	conn.Streams[streamID] = NewStream(streamID, conn.Socket)
}
<commit_msg>Conn should have Transport<commit_after>package quic

import (
	"net"
)

type Conn struct {
	*Transport
	Window  *Window
	Streams map[uint32]*Stream
}

func NewConnection(rAddr *net.UDPAddr) (*Conn, error) {
	t, err := NewTransport(rAddr)
	if err != nil {
		return nil, err
	}
	return &Conn{
		Transport: t,
		Window:    NewWindow(),
		Streams:   make(map[uint32]*Stream),
	}, nil
}

func (conn *Conn) NewStream(streamID uint32) {
	conn.Streams[streamID] = NewStream(streamID, conn)
}

func (conn *Conn) WritePacket(p Packet) error {
	return conn.Send(p)
}

{'fraction_non_alphanumeric': 0.13408393039918118, 'fraction_numerical': 0.012282497441146366, 'mean_word_length': 4.52542372881356, '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': '6132739', 'n_tokens_mistral': 384, 'n_tokens_neox': 367, 'n_words': 90}