diff --git a/common.xml b/common.xml
index 41c83a7..9ea92d7 100644
--- a/common.xml
+++ b/common.xml
@@ -7,6 +7,6 @@ show-heading="true"
show-metadata="true"
expanded="true"
root="false"
-xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">338360commoncommon.xmlCommon importThis tree defines some commonly imported stuff.
\ No newline at end of file
diff --git a/epoche-0002.xml b/epoche-0002.xml
index dc3b2e8..9e7ea0c 100644
--- a/epoche-0002.xml
+++ b/epoche-0002.xml
@@ -7,7 +7,7 @@ show-heading="true"
show-metadata="true"
expanded="true"
root="false"
-xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">305321epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916307323epoche-0001index.xmlEpoche’s forest2024916a list of other websites organi
type="local"
href="sponge-0001.xml"
addr="sponge-0001"
-title="Sponge Lab Notes">Sponge Lab NotesYou can also visit my Sponge Lab Notes
+ Move Semantics in cppYou can also visit my 283247epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916309325epocheepoche.xmlEpochePersonZhengzhou University of Light Industry310326epoche-0001index.xmlEpoche’s forest2024916a list of other websites organi
type="local"
href="sponge-0001.xml"
addr="sponge-0001"
-title="Sponge Lab Notes">Sponge Lab NotesYou can also visit my Sponge Lab Notes
+ Move Semantics in cppYou can also visit my 283247epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916312328move-0001move-0001.xmlMove Semantics in cpp2024922EpocheIn cs144 libsponge buffer header has a very strange constructor that I never seen before:
+
+ (std::move(str))) {}]]>
+
+ When I'm trying to construct a buffer using Buffer payload = Buffer(str);, it doesn't work. So I searched this question on the web and I finally found that correct way to use the constructor is Buffer payload = Buffer(std::move(str));. So I'm going to make some notes about "Move Semantics".241move-0002move-0002.xmlValue Categories2024922EpocheBefore C++11, this language has only two kinds of value: lvalue and rvalue. And only lvalue has reference.
+ lvalue: lvalue is an object that can get its address like variable and array.
+ rvalue: rvalue is an object that can't get its address like literal and temporary variable.C++11 adds the rvalue reference, we can use Type&& to make a rvalue reference. Rvalue reference binds the rvalue object rather than copy it, while the object that be binded will be destoryed.243move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.330move-0002move-0002.xmlValue Categories2024922EpocheBefore C++11, this language has only two kinds of value: lvalue and rvalue. And only lvalue has reference.
+ lvalue: lvalue is an object that can get its address like variable and array.
+ rvalue: rvalue is an object that can't get its address like literal and temporary variable.C++11 adds the rvalue reference, we can use Type&& to make a rvalue reference. Rvalue reference binds the rvalue object rather than copy it, while the object that be binded will be destoryed.332move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.334sponge-0006sponge-0006.xmlSponge lab 3: the TCP sender2024921EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments hat serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection.In practice, sender is responsible for tracking the acknowledgment number and window size of the recever, creating TCP segments and sending them, keeping track of outstanding segments, and resending them if enough time passed since they were sent.EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments that serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection. When a segment has been sent, sender marks it as a outstanding segment, which means the segment has been sent but not acknowledged.
+
+ Sender's retransmission depend on the acknowledgment number, when no segment has been acknowledged, sender resends the earliest outstanding segment if enough time passed since it was sent. Once the acknowledgment number is received, sender compares it to the previous ack number, and if the received is greater than previous number, sender will sweep segments marked as outstanding and send some new segments to fill the flow window.There are lots of details to note:
+ Double the retransmission timeout and record the consecutive number of retransmission when window size is nonzero.
+ Starting timer when sending a new segment.
+ SYN and FIN flag also occupies a sequence number.
+ Window size is the upper bound of bytes in flight.
+ Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.314336sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918316338sponge-0005sponge-0005.xmlTCP SegmentFigure2024918318340ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917320342ocmst-0003ocmst-0003.xmlRed-Black Tree2024917269287ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917322344sponge-0001sponge-0001.xmlSponge Lab Notes2024917243261sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket protocol) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some information to the bytestream, read to read some information from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element from the front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deuqe to access its internal element, the use [] operator, which has only EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some data to the bytestream, read to read some data from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deque to access its internal element, the use [] operator, which has only time complexity.In Minnow, this implementation can achieve a throughput of 16Gbit/s.245263sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the number of bytes in bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the bytestream.EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the bytes number of the bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the byte stream.247265sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918249267sponge-0006sponge-0006.xmlSponge lab 3: the TCP sender2024921EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments hat serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection.In practice, sender is responsible for tracking the acknowledgment number and window size of the recever, creating TCP segments and sending them, keeping track of outstanding segments, and resending them if enough time passed since they were sent.EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments that serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection. When a segment has been sent, sender marks it as a outstanding segment, which means the segment has been sent but not acknowledged.
+
+ Sender's retransmission depend on the acknowledgment number, when no segment has been acknowledged, sender resends the earliest outstanding segment if enough time passed since it was sent. Once the acknowledgment number is received, sender compares it to the previous ack number, and if the received is greater than previous number, sender will sweep segments marked as outstanding and send some new segments to fill the flow window.There are lots of details to note:
+ Double the retransmission timeout and record the consecutive number of retransmission when window size is nonzero.
+ Starting timer when sending a new segment.
+ SYN and FIN flag also occupies a sequence number.
+ Window size is the upper bound of bytes in flight.
+ Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.324346sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket protocol) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some information to the bytestream, read to read some information from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element from the front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deuqe to access its internal element, the use [] operator, which has only EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some data to the bytestream, read to read some data from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deque to access its internal element, the use [] operator, which has only time complexity.In Minnow, this implementation can achieve a throughput of 16Gbit/s.326348sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the number of bytes in bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the bytestream.EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the bytes number of the bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the byte stream.328350ocmst-0002ocmst-0002.xmlBinary Search Tree2024916330352epoche-0001index.xmlEpoche’s forest2024916a list of other websites organi
type="local"
href="sponge-0001.xml"
addr="sponge-0001"
-title="Sponge Lab Notes">Sponge Lab NotesYou can also visit my Sponge Lab Notes
+ Move Semantics in cppYou can also visit my 283247epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916332354ocmst-0001ocmst-0001.xmlFunctional Red-Black Tree Implementation2024916275293ocmst-0002ocmst-0002.xmlBinary Search Tree2024916277295ocmst-0003ocmst-0003.xmlRed-Black Tree2024917269287ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917334356epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916301317epoche-0001index.xmlEpoche’s forest2024916a list of other websites organi
type="local"
href="sponge-0001.xml"
addr="sponge-0001"
-title="Sponge Lab Notes">Sponge Lab NotesYou can also visit my Sponge Lab Notes
+ Move Semantics in cppYou can also visit my 283247epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916
+
+239move-0001move-0001.xmlMove Semantics in cpp2024922EpocheIn cs144 libsponge buffer header has a very strange constructor that I never seen before:
+
+ (std::move(str))) {}]]>
+
+ When I'm trying to construct a buffer using Buffer payload = Buffer(str);, it doesn't work. So I searched this question on the web and I finally found that correct way to use the constructor is Buffer payload = Buffer(std::move(str));. So I'm going to make some notes about "Move Semantics".241move-0002move-0002.xmlValue Categories2024922EpocheBefore C++11, this language has only two kinds of value: lvalue and rvalue. And only lvalue has reference.
+ lvalue: lvalue is an object that can get its address like variable and array.
+ rvalue: rvalue is an object that can't get its address like literal and temporary variable.C++11 adds the rvalue reference, we can use Type&& to make a rvalue reference. Rvalue reference binds the rvalue object rather than copy it, while the object that be binded will be destoryed.243move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.Backlinks245epoche-0001index.xmlEpoche’s forest2024916EpocheThis is my forest, which is a way of organizing notes. Here is a list of other websites organized as forests. Some of the contents here:Sponge Lab Notes
+ Move Semantics in cppYou can also visit my contributor page to see a list of my trees.247epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916EpocheOverview of the Forester markup language
+ Creating your personal biographical tree
\ No newline at end of file
diff --git a/move-0002.xml b/move-0002.xml
new file mode 100644
index 0000000..ca0ce74
--- /dev/null
+++ b/move-0002.xml
@@ -0,0 +1,74 @@
+
+
+249move-0002move-0002.xmlValue Categories2024922EpocheBefore C++11, this language has only two kinds of value: lvalue and rvalue. And only lvalue has reference.
+ lvalue: lvalue is an object that can get its address like variable and array.
+ rvalue: rvalue is an object that can't get its address like literal and temporary variable.C++11 adds the rvalue reference, we can use Type&& to make a rvalue reference. Rvalue reference binds the rvalue object rather than copy it, while the object that be binded will be destoryed.Context251move-0001move-0001.xmlMove Semantics in cpp2024922EpocheIn cs144 libsponge buffer header has a very strange constructor that I never seen before:
+
+ (std::move(str))) {}]]>
+
+ When I'm trying to construct a buffer using Buffer payload = Buffer(str);, it doesn't work. So I searched this question on the web and I finally found that correct way to use the constructor is Buffer payload = Buffer(std::move(str));. So I'm going to make some notes about "Move Semantics".241move-0002move-0002.xmlValue Categories2024922EpocheBefore C++11, this language has only two kinds of value: lvalue and rvalue. And only lvalue has reference.
+ lvalue: lvalue is an object that can get its address like variable and array.
+ rvalue: rvalue is an object that can't get its address like literal and temporary variable.C++11 adds the rvalue reference, we can use Type&& to make a rvalue reference. Rvalue reference binds the rvalue object rather than copy it, while the object that be binded will be destoryed.243move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.
\ No newline at end of file
diff --git a/move-0003.xml b/move-0003.xml
new file mode 100644
index 0000000..329c8bd
--- /dev/null
+++ b/move-0003.xml
@@ -0,0 +1,72 @@
+
+
+253move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.Context255move-0001move-0001.xmlMove Semantics in cpp2024922EpocheIn cs144 libsponge buffer header has a very strange constructor that I never seen before:
+
+ (std::move(str))) {}]]>
+
+ When I'm trying to construct a buffer using Buffer payload = Buffer(str);, it doesn't work. So I searched this question on the web and I finally found that correct way to use the constructor is Buffer payload = Buffer(std::move(str));. So I'm going to make some notes about "Move Semantics".241move-0002move-0002.xmlValue Categories2024922EpocheBefore C++11, this language has only two kinds of value: lvalue and rvalue. And only lvalue has reference.
+ lvalue: lvalue is an object that can get its address like variable and array.
+ rvalue: rvalue is an object that can't get its address like literal and temporary variable.C++11 adds the rvalue reference, we can use Type&& to make a rvalue reference. Rvalue reference binds the rvalue object rather than copy it, while the object that be binded will be destoryed.243move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.
\ No newline at end of file
diff --git a/ocmst-0001.xml b/ocmst-0001.xml
index c5ae39e..2e76ca3 100644
--- a/ocmst-0001.xml
+++ b/ocmst-0001.xml
@@ -7,7 +7,7 @@ show-heading="true"
show-metadata="true"
expanded="true"
root="false"
-xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">303319ocmst-0001ocmst-0001.xmlFunctional Red-Black Tree Implementation2024916275293ocmst-0002ocmst-0002.xmlBinary Search Tree2024916277295ocmst-0003ocmst-0003.xmlRed-Black Tree2024917269287ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917297313ocmst-0002ocmst-0002.xmlBinary Search Tree2024916299315ocmst-0001ocmst-0001.xmlFunctional Red-Black Tree Implementation2024916275293ocmst-0002ocmst-0002.xmlBinary Search Tree2024916277295ocmst-0003ocmst-0003.xmlRed-Black Tree2024917269287ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917271289ocmst-0003ocmst-0003.xmlRed-Black Tree2024917269287ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917273291ocmst-0001ocmst-0001.xmlFunctional Red-Black Tree Implementation2024916275293ocmst-0002ocmst-0002.xmlBinary Search Tree2024916277295ocmst-0003ocmst-0003.xmlRed-Black Tree2024917269287ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917265283ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917267285ocmst-0003ocmst-0003.xmlRed-Black Tree2024917269287ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917336358poem-0001poem-0001.xmlWhat can I hold you with?Jorge Luis BorgesI offer you lean streets, desperate sunsets, the moon of the jagged suburbs.I offer you the bitterness of a man who has looked long and long at the lonely moon.I offer you my ancestors, my dead men, the ghosts that living men have honoured in bronze: my father's father killed in the frontier of Buenos Aires, two bullets through his lungs, bearded and dead, wrapped by his soldiers in the hide of a cow; my mother's grandfather --just twentyfour-- heading a charge of three hundred men in Peru, now ghosts on vanished horses.I offer you whatever insight my books may hold, whatever manliness or humour my life.I offer you the loyalty of a man who has never been loyal.I offer you that kernel of myself that I have saved, somehow --the central heart that deals not in words, traffics not with dreams, and is untouched by time, by joy, by adversities.I offer you the memory of a yellow rose seen at sunset, years before you were born.I offer you explanations of yourself, theories about yourself, authentic and surprising news of yourself.I can give you my loneliness, my darkness, the hunger of my heart; I am trying to bribe you with uncertainty, with danger, with defeat.
\ No newline at end of file
diff --git a/sponge-0001.xml b/sponge-0001.xml
index 75bdaf2..3c327b2 100644
--- a/sponge-0001.xml
+++ b/sponge-0001.xml
@@ -7,7 +7,7 @@ show-heading="true"
show-metadata="true"
expanded="true"
root="false"
-xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">279297sponge-0001sponge-0001.xmlSponge Lab Notes2024917243261sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket protocol) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some information to the bytestream, read to read some information from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element from the front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deuqe to access its internal element, the use [] operator, which has only EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some data to the bytestream, read to read some data from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deque to access its internal element, the use [] operator, which has only time complexity.In Minnow, this implementation can achieve a throughput of 16Gbit/s.245263sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the number of bytes in bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the bytestream.EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the bytes number of the bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the byte stream.247265sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918249267sponge-0006sponge-0006.xmlSponge lab 3: the TCP sender2024921EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments hat serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection.In practice, sender is responsible for tracking the acknowledgment number and window size of the recever, creating TCP segments and sending them, keeping track of outstanding segments, and resending them if enough time passed since they were sent.EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments that serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection. When a segment has been sent, sender marks it as a outstanding segment, which means the segment has been sent but not acknowledged.
+
+ Sender's retransmission depend on the acknowledgment number, when no segment has been acknowledged, sender resends the earliest outstanding segment if enough time passed since it was sent. Once the acknowledgment number is received, sender compares it to the previous ack number, and if the received is greater than previous number, sender will sweep segments marked as outstanding and send some new segments to fill the flow window.There are lots of details to note:
+ Double the retransmission timeout and record the consecutive number of retransmission when window size is nonzero.
+ Starting timer when sending a new segment.
+ SYN and FIN flag also occupies a sequence number.
+ Window size is the upper bound of bytes in flight.
+ Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.281299epoche-0001index.xmlEpoche’s forest2024916a list of other websites organi
type="local"
href="sponge-0001.xml"
addr="sponge-0001"
-title="Sponge Lab Notes">Sponge Lab NotesYou can also visit my Sponge Lab Notes
+ Move Semantics in cppYou can also visit my 283247epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916285301sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket protocol) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some information to the bytestream, read to read some information from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element from the front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deuqe to access its internal element, the use [] operator, which has only EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some data to the bytestream, read to read some data from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deque to access its internal element, the use [] operator, which has only time complexity.In Minnow, this implementation can achieve a throughput of 16Gbit/s.287303sponge-0001sponge-0001.xmlSponge Lab Notes2024917243261sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket protocol) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some information to the bytestream, read to read some information from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element from the front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deuqe to access its internal element, the use [] operator, which has only EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some data to the bytestream, read to read some data from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deque to access its internal element, the use [] operator, which has only time complexity.In Minnow, this implementation can achieve a throughput of 16Gbit/s.245263sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the number of bytes in bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the bytestream.EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the bytes number of the bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the byte stream.247265sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918249267sponge-0006sponge-0006.xmlSponge lab 3: the TCP sender2024921EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments hat serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection.In practice, sender is responsible for tracking the acknowledgment number and window size of the recever, creating TCP segments and sending them, keeping track of outstanding segments, and resending them if enough time passed since they were sent.EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments that serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection. When a segment has been sent, sender marks it as a outstanding segment, which means the segment has been sent but not acknowledged.
+
+ Sender's retransmission depend on the acknowledgment number, when no segment has been acknowledged, sender resends the earliest outstanding segment if enough time passed since it was sent. Once the acknowledgment number is received, sender compares it to the previous ack number, and if the received is greater than previous number, sender will sweep segments marked as outstanding and send some new segments to fill the flow window.There are lots of details to note:
+ Double the retransmission timeout and record the consecutive number of retransmission when window size is nonzero.
+ Starting timer when sending a new segment.
+ SYN and FIN flag also occupies a sequence number.
+ Window size is the upper bound of bytes in flight.
+ Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.289305sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918291307sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the number of bytes in bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the bytestream.EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the bytes number of the bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the byte stream.293309sponge-0001sponge-0001.xmlSponge Lab Notes2024917243261sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket protocol) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some information to the bytestream, read to read some information from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element from the front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deuqe to access its internal element, the use [] operator, which has only EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some data to the bytestream, read to read some data from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deque to access its internal element, the use [] operator, which has only time complexity.In Minnow, this implementation can achieve a throughput of 16Gbit/s.245263sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the number of bytes in bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the bytestream.EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the bytes number of the bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the byte stream.247265sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918249267sponge-0006sponge-0006.xmlSponge lab 3: the TCP sender2024921EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments hat serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection.In practice, sender is responsible for tracking the acknowledgment number and window size of the recever, creating TCP segments and sending them, keeping track of outstanding segments, and resending them if enough time passed since they were sent.EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments that serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection. When a segment has been sent, sender marks it as a outstanding segment, which means the segment has been sent but not acknowledged.
+
+ Sender's retransmission depend on the acknowledgment number, when no segment has been acknowledged, sender resends the earliest outstanding segment if enough time passed since it was sent. Once the acknowledgment number is received, sender compares it to the previous ack number, and if the received is greater than previous number, sender will sweep segments marked as outstanding and send some new segments to fill the flow window.There are lots of details to note:
+ Double the retransmission timeout and record the consecutive number of retransmission when window size is nonzero.
+ Starting timer when sending a new segment.
+ SYN and FIN flag also occupies a sequence number.
+ Window size is the upper bound of bytes in flight.
+ Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.295311sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918251269sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918253271sponge-0001sponge-0001.xmlSponge Lab Notes2024917243261sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket protocol) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some information to the bytestream, read to read some information from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element from the front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deuqe to access its internal element, the use [] operator, which has only EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some data to the bytestream, read to read some data from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deque to access its internal element, the use [] operator, which has only time complexity.In Minnow, this implementation can achieve a throughput of 16Gbit/s.245263sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the number of bytes in bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the bytestream.EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the bytes number of the bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the byte stream.247265sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918249267sponge-0006sponge-0006.xmlSponge lab 3: the TCP sender2024921EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments hat serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection.In practice, sender is responsible for tracking the acknowledgment number and window size of the recever, creating TCP segments and sending them, keeping track of outstanding segments, and resending them if enough time passed since they were sent.EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments that serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection. When a segment has been sent, sender marks it as a outstanding segment, which means the segment has been sent but not acknowledged.
+
+ Sender's retransmission depend on the acknowledgment number, when no segment has been acknowledged, sender resends the earliest outstanding segment if enough time passed since it was sent. Once the acknowledgment number is received, sender compares it to the previous ack number, and if the received is greater than previous number, sender will sweep segments marked as outstanding and send some new segments to fill the flow window.There are lots of details to note:
+ Double the retransmission timeout and record the consecutive number of retransmission when window size is nonzero.
+ Starting timer when sending a new segment.
+ SYN and FIN flag also occupies a sequence number.
+ Window size is the upper bound of bytes in flight.
+ Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.255273sponge-0005sponge-0005.xmlTCP SegmentFigure2024918257275sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket protocol) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some information to the bytestream, read to read some information from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element from the front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deuqe to access its internal element, the use [] operator, which has only EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some data to the bytestream, read to read some data from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deque to access its internal element, the use [] operator, which has only time complexity.In Minnow, this implementation can achieve a throughput of 16Gbit/s.259277sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the number of bytes in bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the bytestream.
\ No newline at end of file
+title="Epoche">EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the bytes number of the bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the byte stream.
\ No newline at end of file
diff --git a/sponge-0005.xml b/sponge-0005.xml
index c793383..e27476b 100644
--- a/sponge-0005.xml
+++ b/sponge-0005.xml
@@ -7,7 +7,7 @@ show-heading="true"
show-metadata="true"
expanded="true"
root="false"
-xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">261279sponge-0005sponge-0005.xmlTCP SegmentFigure2024918263281sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918239257sponge-0006sponge-0006.xmlSponge lab 3: the TCP sender2024921EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments hat serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection.In practice, sender is responsible for tracking the acknowledgment number and window size of the recever, creating TCP segments and sending them, keeping track of outstanding segments, and resending them if enough time passed since they were sent.EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments that serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection. When a segment has been sent, sender marks it as a outstanding segment, which means the segment has been sent but not acknowledged.
+
+ Sender's retransmission depend on the acknowledgment number, when no segment has been acknowledged, sender resends the earliest outstanding segment if enough time passed since it was sent. Once the acknowledgment number is received, sender compares it to the previous ack number, and if the received is greater than previous number, sender will sweep segments marked as outstanding and send some new segments to fill the flow window.There are lots of details to note:
+ Double the retransmission timeout and record the consecutive number of retransmission when window size is nonzero.
+ Starting timer when sending a new segment.
+ SYN and FIN flag also occupies a sequence number.
+ Window size is the upper bound of bytes in flight.
+ Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.241259sponge-0001sponge-0001.xmlSponge Lab Notes2024917243261sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket protocol) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some information to the bytestream, read to read some information from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element from the front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deuqe to access its internal element, the use [] operator, which has only EpocheTask 1: WebgetTo implement a byte stream based on the reliable transmission interface (TCP socket) provided by the system. In pratice, it uses the TCP Socket API such as connect to establish a connection with server, write to write some data to the bytestream, read to read some data from the bytestream, and close the socket communication finally.Task 2: In Memory Byte StreamTask 2 is require us to maintain a container that can push some element to the container's back, and take some element front. So we can use queue, however, the effciency of the queue is very bad when we peek some bytes of certain length, because in this function we just view them rather than pop them out. In this way, we can use deque to access its internal element, the use [] operator, which has only time complexity.In Minnow, this implementation can achieve a throughput of 16Gbit/s.245263sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the number of bytes in bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the bytestream.EpocheReassembler receive a substring that no more than about 1,460 bytes apiece, consisting of a string of bytes, and the index of the first byte of that string within the larger byte stream. Every byte in stream has index. As soon as reassembler find the next byte of the stream, it will put the byte in the byte stream to keep data in order.This lab requires a data structure that allows internal bytes to be arranged in order. Firstly, pushing the byte with index 0, and then pushing byte in which the precursor byte has been pushed. I to do this with vector, just like counting sort, I set a vector whose maximum length is the bytes number of the bytestream, and when I get a substring, I put each byte into the vector, the index of the bytes in the vector is the index of the byte stream.Considering the implementation of the function, when I get a string, I put it into reassembler buffer. If the first byte index of the string is less than or equal to the next expected index (which is initial to 0), the buffer is traversed from the next expected index to the end of the buffer, finding the bytes that contiguous from next expected byte and pushing them into the bytestream. Otherwise, don't traverse. In both cases, the maximum length buffer can contain is the avaliable capacity of the byte stream.247265sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918249267sponge-0006sponge-0006.xmlSponge lab 3: the TCP sender2024921EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments hat serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection.In practice, sender is responsible for tracking the acknowledgment number and window size of the recever, creating TCP segments and sending them, keeping track of outstanding segments, and resending them if enough time passed since they were sent.
\ No newline at end of file
+title="Epoche">EpocheThe TCP sender is another participant in the TCP connection at an endpoint. It's responsible for reading from the bytestream, spliting it into some segments that serve as the payload of the TCP segment, writing the SYN, FIN, and Sequence Number in the TCP segment header, and then conveying these TCP segments to another endpoint in the connection. When a segment has been sent, sender marks it as a outstanding segment, which means the segment has been sent but not acknowledged.
+
+ Sender's retransmission depend on the acknowledgment number, when no segment has been acknowledged, sender resends the earliest outstanding segment if enough time passed since it was sent. Once the acknowledgment number is received, sender compares it to the previous ack number, and if the received is greater than previous number, sender will sweep segments marked as outstanding and send some new segments to fill the flow window.There are lots of details to note:
+ Double the retransmission timeout and record the consecutive number of retransmission when window size is nonzero.
+ Starting timer when sending a new segment.
+ SYN and FIN flag also occupies a sequence number.
+ Window size is the upper bound of bytes in flight.
+ Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.
\ No newline at end of file
diff --git a/style.css b/style.css
index 68f8029..6264915 100644
--- a/style.css
+++ b/style.css
@@ -23,6 +23,7 @@ body {
line-height: 1.5em;
hyphens: auto;
overflow-x: hidden;
+ /* font-size-adjust: from-font; */
}
.cjk-text {