From adcdbf7c02be8125780062c859912b322b886dff Mon Sep 17 00:00:00 2001 From: eopche Date: Wed, 13 Nov 2024 22:32:24 +0800 Subject: [PATCH] Deploy --- common.xml | 2 +- cpp-0001.xml | 16 +++ epoche-0002.xml | 6 +- epoche.xml | 240 +++++++++++++++++++++++++++++++++----------- forest.json | 2 +- fstm-0001.xml | 14 +-- fstm-0002.xml | 12 +-- fstm-0003.xml | 12 +-- fstm-0004.xml | 14 +-- index.xml | 4 +- internet-0001.xml | 4 +- move-0001.xml | 18 ++-- move-0002.xml | 18 ++-- move-0003.xml | 18 ++-- ocmst-0001.xml | 8 +- ocmst-0002.xml | 10 +- ocmst-0003.xml | 12 +-- ocmst-0004.xml | 6 +- poem-0001.xml | 2 +- riscv-0001.xml | 11 +- riscv-0002.xml | 13 ++- riscv-0003.xml | 14 ++- riscv-is-manual.xml | 4 +- rust-0001.xml | 6 +- rust-0002.xml | 8 +- rust-0003.xml | 8 +- sponge-0001.xml | 33 ++++-- sponge-0002.xml | 35 +++++-- sponge-0003.xml | 33 ++++-- sponge-0004.xml | 37 +++++-- sponge-0005.xml | 4 +- sponge-0006.xml | 33 ++++-- sponge-0007.xml | 130 ++++++++++++++++++++++++ tplt-0001.xml | 47 +++++++++ tplt-0002.xml | 86 ++++++++++++++++ 35 files changed, 697 insertions(+), 223 deletions(-) create mode 100644 cpp-0001.xml create mode 100644 sponge-0007.xml create mode 100644 tplt-0001.xml create mode 100644 tplt-0002.xml diff --git a/common.xml b/common.xml index ffc9f82..60f4865 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">446470commoncommon.xmlCommon importThis tree defines some commonly imported stuff. \ No newline at end of file diff --git a/cpp-0001.xml b/cpp-0001.xml new file mode 100644 index 0000000..da16fc5 --- /dev/null +++ b/cpp-0001.xml @@ -0,0 +1,16 @@ + + +245cpp-0001cpp-0001.xmlReference20241113EpocheReference is the alias of a variable, the aliases refer to a same data in the memory with the variable. \ No newline at end of file diff --git a/epoche-0002.xml b/epoche-0002.xml index 00779a6..c0e982e 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">381397epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916383399epoche-0001index.xmlEpoche's forest2024916279303epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916385401epocheepoche.xmlEpochePersonZhengzhou University of Light Industry386402epoche-0001index.xmlEpoche's forest2024916279303epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916388404tplt-0002tplt-0002.xmlBasic Usage20241113EpocheThis link explain the difference between template<typename T> and template<class T>.Specialized function:Create specialized templated functions, that do + different things for different types. Take the following contrived example, + which prints the type if its a float type, but just prints hello world for + all other types. + + +void print_msg() { + std::cout << "Hello world!\n"; +}]]>Specialized templated function, specialized on the float type. + + +void print_msg() { + std::cout << "print_msg called with float type!\n"; +}]]>Template parameters can also is a value: +int f() { + return V; +}]]>Above behavior also work in classes.406cpp-0001cpp-0001.xmlReference20241113EpocheReference is the alias of a variable, the aliases refer to a same data in the memory with the variable.408sponge-0007sponge-0007.xmlSponge Lab 4: the TCP Connection20241113Epoche在实验2-3中,实现了发送者和接受。 + + 其中发送者读取字节流,将字节流截取为一个个 TCP 段,将 TCP 段发送至结构体内的队列中共上层结构使用,发送者会对 TCP 段的 fin,syn,标志进行修改,包括最初发送一个包含 syn 标志的段来进行三次握手的连接、当字节流到达文件尾时,发送包含 fin 标志的段来传递结束 TCP 连接。发送者还包括410tplt-0001tplt-0001.xmlTemplates in cpp20241113Epoche243tplt-0002tplt-0002.xmlBasic Usage20241113EpocheThis link explain the difference between template<typename T> and template<class T>.Specialized function:Create specialized templated functions, that do + different things for different types. Take the following contrived example, + which prints the type if its a float type, but just prints hello world for + all other types. + + +void print_msg() { + std::cout << "Hello world!\n"; +}]]>Specialized templated function, specialized on the float type. + + +void print_msg() { + std::cout << "print_msg called with float type!\n"; +}]]>Template parameters can also is a value: +int f() { + return V; +}]]>Above behavior also work in classes.412riscv-0003riscv-0003.xmlCSR (Control and Status Registers)20241020Epochestval, scause record reason and attached information of this trap. stvec record the address of the trap handle code. Memory Map Unit - satp can control the mode of memory map: bare, Sv39, Sv48. - satp can control the mode of memory map: bare, Sv39, Sv48.390414riscv-0002riscv-0002.xmlGeneral Registers20241019392416riscv-0001riscv-0001.xmlRISC-V Registers20241019243267riscv-0002riscv-0002.xmlGeneral Registers20241019245269riscv-0003riscv-0003.xmlCSR (Control and Status Registers)20241020Epochestval, scause record reason and attached information of this trap. stvec record the address of the trap handle code. Memory Map Unit - satp can control the mode of memory map: bare, Sv39, Sv48. - satp can control the mode of memory map: bare, Sv39, Sv48.394418fstm-0004fstm-0004.xmlBlock Device20241018EpocheEpoche396420fstm-0002fstm-0002.xmlFile20241018398422fstm-0003fstm-0003.xmlInode20241018400424fstm-0001fstm-0001.xmlLinux Filesystem20241018261285fstm-0002fstm-0002.xmlFile20241018263287fstm-0003fstm-0003.xmlInode20241018265289fstm-0004fstm-0004.xmlBlock Device20241018EpocheEpoche402426rust-0002rust-0002.xmlLifetime20241017404428rust-0001rust-0001.xmlRustlings notes20241017285309rust-0003rust-0003.xmlWhere clauses and Trait Bound20241017287311rust-0002rust-0002.xmlLifetime20241017406430rust-0003rust-0003.xmlWhere clauses and Trait Bound20241017408432internet-0001internet-0001.xmlTCP Socket2024926410434move-0001move-0001.xmlMove Semantics in cpp2024922cs144 libsponge buffer header has a very strange constructor that I never seen before: (std::move(str))) {}]]> + : _storage( + std::make_shared(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".301325move-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.rvalue: rvalue is an object that can't get its address like temporary variable (rvalues are anything that is not a lvalue).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. Rvalue reference is a 'lvalue' in a experssion.303327move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.Epochestd::move is a template function in <utility> header of cpp standred library. It converts a lvalue or creates a experssion to a rvalue.In pratical, move semantics is useful deal with the object with large memory allocation. In numeric type, move is unnecessary.412436move-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.rvalue: rvalue is an object that can't get its address like temporary variable (rvalues are anything that is not a lvalue).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. Rvalue reference is a 'lvalue' in a experssion.414438move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.Epochestd::move is a template function in <utility> header of cpp standred library. It converts a lvalue or creates a experssion to a rvalue.416440sponge-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 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: + 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 which 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. @@ -471,7 +574,7 @@ show-heading="true" show-metadata="true" expanded="false" root="false" -xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">418442sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918420444sponge-0005sponge-0005.xmlTCP SegmentFigure2024918422446ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917424448ocmst-0003ocmst-0003.xmlRed-Black Tree2024917345361ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917426450sponge-0001sponge-0001.xmlSponge Lab Notes2024917319251sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917321253sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917323255sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918325257sponge-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 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: + 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 which 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.Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.259sponge-0007sponge-0007.xmlSponge Lab 4: the TCP Connection20241113Epoche在实验2-3中,实现了发送者和接受。 + + 其中发送者读取字节流,将字节流截取为一个个 TCP 段,将 TCP 段发送至结构体内的队列中共上层结构使用,发送者会对 TCP 段的 fin,syn,标志进行修改,包括最初发送一个包含 syn 标志的段来进行三次握手的连接、当字节流到达文件尾时,发送包含 fin 标志的段来传递结束 TCP 连接。发送者还包括428452sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917430454sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917432456ocmst-0002ocmst-0002.xmlBinary Search Tree2024916434458epoche-0001index.xmlEpoche's forest2024916279303epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916436460ocmst-0001ocmst-0001.xmlFunctional Red-Black Tree Implementation2024916351367ocmst-0002ocmst-0002.xmlBinary Search Tree2024916353369ocmst-0003ocmst-0003.xmlRed-Black Tree2024917345361ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917438462epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916275299fstm-0001fstm-0001.xmlLinux Filesystem20241018261285fstm-0002fstm-0002.xmlFile20241018263287fstm-0003fstm-0003.xmlInode20241018265289fstm-0004fstm-0004.xmlBlock Device20241018EpocheEpoche277301epoche-0001index.xmlEpoche's forest2024916279303epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916267291fstm-0002fstm-0002.xmlFile20241018269293fstm-0001fstm-0001.xmlLinux Filesystem20241018261285fstm-0002fstm-0002.xmlFile20241018263287fstm-0003fstm-0003.xmlInode20241018265289fstm-0004fstm-0004.xmlBlock Device20241018EpocheEpoche271295fstm-0003fstm-0003.xmlInode20241018273297fstm-0001fstm-0001.xmlLinux Filesystem20241018261285fstm-0002fstm-0002.xmlFile20241018263287fstm-0003fstm-0003.xmlInode20241018265289fstm-0004fstm-0004.xmlBlock Device20241018EpocheEpoche257281fstm-0004fstm-0004.xmlBlock Device20241018EpocheEpoche259283fstm-0001fstm-0001.xmlLinux Filesystem20241018261285fstm-0002fstm-0002.xmlFile20241018263287fstm-0003fstm-0003.xmlInode20241018265289fstm-0004fstm-0004.xmlBlock Device20241018EpocheEpoche377393epoche-0001index.xmlEpoche's forest2024916279303epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916295319internet-0001internet-0001.xmlTCP Socket2024926297321sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917299323move-0001move-0001.xmlMove Semantics in cpp2024922cs144 libsponge buffer header has a very strange constructor that I never seen before: (std::move(str))) {}]]> + : _storage( + std::make_shared(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".301325move-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.rvalue: rvalue is an object that can't get its address like temporary variable (rvalues are anything that is not a lvalue).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. Rvalue reference is a 'lvalue' in a experssion.303327move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.Epochestd::move is a template function in <utility> header of cpp standred library. It converts a lvalue or creates a experssion to a rvalue.In pratical, move semantics is useful deal with the object with large memory allocation. In numeric type, move is unnecessary.305329epoche-0001index.xmlEpoche's forest2024916279303epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916307331move-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.rvalue: rvalue is an object that can't get its address like temporary variable (rvalues are anything that is not a lvalue).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. Rvalue reference is a 'lvalue' in a experssion.309333move-0001move-0001.xmlMove Semantics in cpp2024922cs144 libsponge buffer header has a very strange constructor that I never seen before: (std::move(str))) {}]]> + : _storage( + std::make_shared(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".301325move-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.rvalue: rvalue is an object that can't get its address like temporary variable (rvalues are anything that is not a lvalue).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. Rvalue reference is a 'lvalue' in a experssion.303327move-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 +title="Epoche">Epochestd::move is a template function in <utility> header of cpp standred library. It converts a lvalue or creates a experssion to a rvalue.In pratical, move semantics is useful deal with the object with large memory allocation. In numeric type, move is unnecessary. \ No newline at end of file diff --git a/move-0003.xml b/move-0003.xml index f721ddc..5e27f63 100644 --- a/move-0003.xml +++ b/move-0003.xml @@ -7,13 +7,13 @@ show-heading="true" show-metadata="true" expanded="true" root="false" -xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">311335move-0003move-0003.xmlThe std::move function2024922Epochestd::move is a function template in cpp standred library. It converts a lvalue to rvalue reference.Epochestd::move is a template function in <utility> header of cpp standred library. It converts a lvalue or creates a experssion to a rvalue.313337move-0001move-0001.xmlMove Semantics in cpp2024922cs144 libsponge buffer header has a very strange constructor that I never seen before: (std::move(str))) {}]]> + : _storage( + std::make_shared(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".301325move-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.rvalue: rvalue is an object that can't get its address like temporary variable (rvalues are anything that is not a lvalue).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. Rvalue reference is a 'lvalue' in a experssion.303327move-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 +title="Epoche">Epochestd::move is a template function in <utility> header of cpp standred library. It converts a lvalue or creates a experssion to a rvalue.In pratical, move semantics is useful deal with the object with large memory allocation. In numeric type, move is unnecessary. \ No newline at end of file diff --git a/ocmst-0001.xml b/ocmst-0001.xml index 06b4797..2809eb9 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">379395ocmst-0001ocmst-0001.xmlFunctional Red-Black Tree Implementation2024916351367ocmst-0002ocmst-0002.xmlBinary Search Tree2024916353369ocmst-0003ocmst-0003.xmlRed-Black Tree2024917345361ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917373389ocmst-0002ocmst-0002.xmlBinary Search Tree2024916375391ocmst-0001ocmst-0001.xmlFunctional Red-Black Tree Implementation2024916351367ocmst-0002ocmst-0002.xmlBinary Search Tree2024916353369ocmst-0003ocmst-0003.xmlRed-Black Tree2024917345361ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917347363ocmst-0003ocmst-0003.xmlRed-Black Tree2024917345361ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917349365ocmst-0001ocmst-0001.xmlFunctional Red-Black Tree Implementation2024916351367ocmst-0002ocmst-0002.xmlBinary Search Tree2024916353369ocmst-0003ocmst-0003.xmlRed-Black Tree2024917345361ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917341357ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917343359ocmst-0003ocmst-0003.xmlRed-Black Tree2024917345361ocmst-0004ocmst-0004.xmlInsertion (Okaskaki's algorithm)2024917444468poem-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/riscv-0001.xml b/riscv-0001.xml index 2381efb..f755ba0 100644 --- a/riscv-0001.xml +++ b/riscv-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">253277riscv-0001riscv-0001.xmlRISC-V Registers20241019243267riscv-0002riscv-0002.xmlGeneral Registers20241019245269riscv-0003riscv-0003.xmlCSR (Control and Status Registers)20241020Epochestval, scause record reason and attached information of this trap. stvec record the address of the trap handle code. Memory Map Unit - satp can control the mode of memory map: bare, Sv39, Sv48. - satp can control the mode of memory map: bare, Sv39, Sv48.255279riscv-is-manualriscv-is-manual.xmlThe RISC-V Instruction Set ManualReferenceAndrew Waterman, Krste Asanovic, SiFive Inc.https://riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf \ No newline at end of file diff --git a/riscv-0002.xml b/riscv-0002.xml index 5c5ba1f..1451e91 100644 --- a/riscv-0002.xml +++ b/riscv-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">247271riscv-0002riscv-0002.xmlGeneral Registers20241019249273riscv-is-manualriscv-is-manual.xmlThe RISC-V Instruction Set ManualReferenceAndrew Waterman, Krste Asanovic, SiFive Inc.https://riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf251275riscv-0001riscv-0001.xmlRISC-V Registers20241019243267riscv-0002riscv-0002.xmlGeneral Registers20241019245269riscv-0003riscv-0003.xmlCSR (Control and Status Registers)20241020Epochestval, scause record reason and attached information of this trap. stvec record the address of the trap handle code. Memory Map Unit - satp can control the mode of memory map: bare, Sv39, Sv48. - \ No newline at end of file + satp can control the mode of memory map: bare, Sv39, Sv48. \ No newline at end of file diff --git a/riscv-0003.xml b/riscv-0003.xml index 8e6c8bf..8ccc829 100644 --- a/riscv-0003.xml +++ b/riscv-0003.xml @@ -7,7 +7,7 @@ show-heading="true" show-metadata="true" expanded="true" root="false" -xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">239263riscv-0003riscv-0003.xmlCSR (Control and Status Registers)20241020Epochestval, scause record reason and attached information of this trap. stvec record the address of the trap handle code. Memory Map Unit - satp can control the mode of memory map: bare, Sv39, Sv48. - satp can control the mode of memory map: bare, Sv39, Sv48.241265riscv-0001riscv-0001.xmlRISC-V Registers20241019243267riscv-0002riscv-0002.xmlGeneral Registers20241019245269riscv-0003riscv-0003.xmlCSR (Control and Status Registers)20241020Epochestval, scause record reason and attached information of this trap. stvec record the address of the trap handle code. Memory Map Unit - satp can control the mode of memory map: bare, Sv39, Sv48. - \ No newline at end of file + satp can control the mode of memory map: bare, Sv39, Sv48. \ No newline at end of file diff --git a/riscv-is-manual.xml b/riscv-is-manual.xml index 68e14c8..b8be1bb 100644 --- a/riscv-is-manual.xml +++ b/riscv-is-manual.xml @@ -7,7 +7,7 @@ show-heading="true" show-metadata="true" expanded="true" root="false" -xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">440464riscv-is-manualriscv-is-manual.xmlThe RISC-V Instruction Set ManualReferenceAndrew Waterman, Krste Asanovic, SiFive Inc.https://riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf442466riscv-0002riscv-0002.xmlGeneral Registers20241019289313rust-0001rust-0001.xmlRustlings notes20241017285309rust-0003rust-0003.xmlWhere clauses and Trait Bound20241017287311rust-0002rust-0002.xmlLifetime20241017281305rust-0002rust-0002.xmlLifetime20241017283307rust-0001rust-0001.xmlRustlings notes20241017285309rust-0003rust-0003.xmlWhere clauses and Trait Bound20241017287311rust-0002rust-0002.xmlLifetime20241017291315rust-0003rust-0003.xmlWhere clauses and Trait Bound20241017293317rust-0001rust-0001.xmlRustlings notes20241017285309rust-0003rust-0003.xmlWhere clauses and Trait Bound20241017287311rust-0002rust-0002.xmlLifetime20241017355371sponge-0001sponge-0001.xmlSponge Lab Notes2024917319251sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917321253sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917323255sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918325257sponge-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 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: + 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 which 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.Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.259sponge-0007sponge-0007.xmlSponge Lab 4: the TCP Connection20241113Epoche在实验2-3中,实现了发送者和接受。 + + 其中发送者读取字节流,将字节流截取为一个个 TCP 段,将 TCP 段发送至结构体内的队列中共上层结构使用,发送者会对 TCP 段的 fin,syn,标志进行修改,包括最初发送一个包含 syn 标志的段来进行三次握手的连接、当字节流到达文件尾时,发送包含 fin 标志的段来传递结束 TCP 连接。发送者还包括357373epoche-0001index.xmlEpoche's forest2024916279303epoche-0002epoche-0002.xmlLearning progress on evergreen notes in forester2024916359375sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917361377sponge-0001sponge-0001.xmlSponge Lab Notes2024917319251sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917321253sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917323255sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918325257sponge-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 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: + 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 which 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.Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.259sponge-0007sponge-0007.xmlSponge Lab 4: the TCP Connection20241113Epoche在实验2-3中,实现了发送者和接受。 + + 其中发送者读取字节流,将字节流截取为一个个 TCP 段,将 TCP 段发送至结构体内的队列中共上层结构使用,发送者会对 TCP 段的 fin,syn,标志进行修改,包括最初发送一个包含 syn 标志的段来进行三次握手的连接、当字节流到达文件尾时,发送包含 fin 标志的段来传递结束 TCP 连接。发送者还包括363379internet-0001internet-0001.xmlTCP Socket2024926365381sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918367383sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917369385sponge-0001sponge-0001.xmlSponge Lab Notes2024917319251sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917321253sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917323255sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918325257sponge-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 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: + 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 which 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.Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.259sponge-0007sponge-0007.xmlSponge Lab 4: the TCP Connection20241113Epoche在实验2-3中,实现了发送者和接受。 + + 其中发送者读取字节流,将字节流截取为一个个 TCP 段,将 TCP 段发送至结构体内的队列中共上层结构使用,发送者会对 TCP 段的 fin,syn,标志进行修改,包括最初发送一个包含 syn 标志的段来进行三次握手的连接、当字节流到达文件尾时,发送包含 fin 标志的段来传递结束 TCP 连接。发送者还包括371387sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918327343sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918329345sponge-0001sponge-0001.xmlSponge Lab Notes2024917319251sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917321253sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917323255sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918325257sponge-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 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: + 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 which 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.Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.259sponge-0007sponge-0007.xmlSponge Lab 4: the TCP Connection20241113Epoche在实验2-3中,实现了发送者和接受。 + + 其中发送者读取字节流,将字节流截取为一个个 TCP 段,将 TCP 段发送至结构体内的队列中共上层结构使用,发送者会对 TCP 段的 fin,syn,标志进行修改,包括最初发送一个包含 syn 标志的段来进行三次握手的连接、当字节流到达文件尾时,发送包含 fin 标志的段来传递结束 TCP 连接。发送者还包括331347sponge-0005sponge-0005.xmlTCP SegmentFigure2024918333349sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917335351sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917337353sponge-0005sponge-0005.xmlTCP SegmentFigure2024918339355sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918315339sponge-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 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: + 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 which 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. @@ -35,7 +35,7 @@ show-heading="true" show-metadata="true" expanded="false" root="false" -xmlns:fr="http://www.jonmsterling.com/jms-005P.xml">317341sponge-0001sponge-0001.xmlSponge Lab Notes2024917319251sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917321253sponge-0003sponge-0003.xmlSponge Lab 1: stitching substrings into a byte stream2024917323255sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918325257sponge-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 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: + 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 which 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 + Reject outdate and illegal acknowledgment number.Sender isn't hard to implement, but it's a little bit complicated.259sponge-0007sponge-0007.xmlSponge Lab 4: the TCP Connection20241113Epoche在实验2-3中,实现了发送者和接受。 + + 其中发送者读取字节流,将字节流截取为一个个 TCP 段,将 TCP 段发送至结构体内的队列中共上层结构使用,发送者会对 TCP 段的 fin,syn,标志进行修改,包括最初发送一个包含 syn 标志的段来进行三次握手的连接、当字节流到达文件尾时,发送包含 fin 标志的段来传递结束 TCP 连接。发送者还包括 \ No newline at end of file diff --git a/sponge-0007.xml b/sponge-0007.xml new file mode 100644 index 0000000..8bd7769 --- /dev/null +++ b/sponge-0007.xml @@ -0,0 +1,130 @@ + + +247sponge-0007sponge-0007.xmlSponge Lab 4: the TCP Connection20241113Epoche在实验2-3中,实现了发送者和接受。 + + 其中发送者读取字节流,将字节流截取为一个个 TCP 段,将 TCP 段发送至结构体内的队列中共上层结构使用,发送者会对 TCP 段的 fin,syn,标志进行修改,包括最初发送一个包含 syn 标志的段来进行三次握手的连接、当字节流到达文件尾时,发送包含 fin 标志的段来传递结束 TCP 连接。发送者还包括Context249sponge-0001sponge-0001.xmlSponge Lab Notes2024917Epoche251sponge-0002sponge-0002.xmlSponge Lab 0: networking warmup2024917EpocheTask 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.253sponge-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 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.255sponge-0004sponge-0004.xmlSponge Lab 2: the TCP Receiver2024918EpocheTCP Receiver receives the TCP segment and the payload of the datagram, reassembler in receiver reassembling the bytes and pushing into bytestream, so that code can read the data from bytestream with TCP socket read function(such as the first lab). Additinoally, receiver also send the acknowledgement number and window size to control the flow of incoming data.Firstly we need to implement the conversion functions that can convert the sequence number to the absolute sequence number, ensuring that unwrap and wrap are correct. The segment_received function will call the push_substring function to push the payload to the reassembler. When the syn flag is true, we must set the index is 0 regardless of the empty payload.In ackno function, it needs to add 1 when recieve the syn flag because syn also occupies a seq number. About the fin flag, we can check the status of bytestream and plus ackno 1 if it is closed.257sponge-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 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 which 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.259sponge-0007sponge-0007.xmlSponge Lab 4: the TCP Connection20241113Epoche在实验2-3中,实现了发送者和接受。 + + 其中发送者读取字节流,将字节流截取为一个个 TCP 段,将 TCP 段发送至结构体内的队列中共上层结构使用,发送者会对 TCP 段的 fin,syn,标志进行修改,包括最初发送一个包含 syn 标志的段来进行三次握手的连接、当字节流到达文件尾时,发送包含 fin 标志的段来传递结束 TCP 连接。发送者还包括 \ No newline at end of file diff --git a/tplt-0001.xml b/tplt-0001.xml new file mode 100644 index 0000000..3a80f1e --- /dev/null +++ b/tplt-0001.xml @@ -0,0 +1,47 @@ + + +261tplt-0001tplt-0001.xmlTemplates in cpp20241113Epoche243tplt-0002tplt-0002.xmlBasic Usage20241113EpocheThis link explain the difference between template<typename T> and template<class T>.Specialized function:Create specialized templated functions, that do + different things for different types. Take the following contrived example, + which prints the type if its a float type, but just prints hello world for + all other types. + + +void print_msg() { + std::cout << "Hello world!\n"; +}]]>Specialized templated function, specialized on the float type. + + +void print_msg() { + std::cout << "print_msg called with float type!\n"; +}]]>Template parameters can also is a value: +int f() { + return V; +}]]>Above behavior also work in classes. \ No newline at end of file diff --git a/tplt-0002.xml b/tplt-0002.xml new file mode 100644 index 0000000..6c2217d --- /dev/null +++ b/tplt-0002.xml @@ -0,0 +1,86 @@ + + +239tplt-0002tplt-0002.xmlBasic Usage20241113EpocheThis link explain the difference between template<typename T> and template<class T>.Specialized function:Create specialized templated functions, that do + different things for different types. Take the following contrived example, + which prints the type if its a float type, but just prints hello world for + all other types. + + +void print_msg() { + std::cout << "Hello world!\n"; +}]]>Specialized templated function, specialized on the float type. + + +void print_msg() { + std::cout << "print_msg called with float type!\n"; +}]]>Template parameters can also is a value: +int f() { + return V; +}]]>Above behavior also work in classes.Context241tplt-0001tplt-0001.xmlTemplates in cpp20241113Epoche243tplt-0002tplt-0002.xmlBasic Usage20241113EpocheThis link explain the difference between template<typename T> and template<class T>.Specialized function:Create specialized templated functions, that do + different things for different types. Take the following contrived example, + which prints the type if its a float type, but just prints hello world for + all other types. + + +void print_msg() { + std::cout << "Hello world!\n"; +}]]>Specialized templated function, specialized on the float type. + + +void print_msg() { + std::cout << "print_msg called with float type!\n"; +}]]>Template parameters can also is a value: +int f() { + return V; +}]]>Above behavior also work in classes. \ No newline at end of file