tested basic windowing. should test with packetloss simulation.
Added packetloss. Added thread sleeping code. should integrate chris code. Should add windowing mechanism