Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cefca8ad91
|
||
|
|
a86367b5b9
|
@@ -23,7 +23,7 @@ Last rendered {localdatetime}
|
||||
|
||||
[id="ref"]
|
||||
== Reference
|
||||
In addition to the documentation found in this document and https://wireproto.io/[the specification^], library usage documentation can be found at https://pkg.go.dev/go.pkg.dev/r00t2.io/WireProto[the Golang module documentation page^]:
|
||||
In addition to the documentation found in this document and https://wireproto.io/[the specification^], library usage documentation can be found at https://pkg.go.dev/r00t2.io/wireproto[the Golang module documentation page^]:
|
||||
|
||||
++++
|
||||
<a href="https://go.pkg.dev/r00t2.io/wireproto">
|
||||
@@ -57,3 +57,6 @@ The following are a wishlist or things planned that may come in later versions.
|
||||
** This of course won't work for serializing and keeping *order* of children (e.g. RG => Record); that'd still need to be ordered, but it will allow for parallel parsing *of* those children. Should benchmark, though; it may not be worth it.
|
||||
* `context.Context` support for `Read*` and `Write*` funcs
|
||||
** This is a relatively low priority as the passed `net.Conn` will likely return an error if its own context is canceled. This can be handled in the caller downstream.
|
||||
* `.Append*()` methods to append any type to any parent type. e.g. `<Response>.AppendFVP(<FieldValuePair>)` would append an FVP to the most recent ResponseRecord to the most recent ResponseRecordGroup (or create if they don't exist), `<Response>.AppendRecord(...)` for appending a record to most recent record group etc.
|
||||
* Better/more strict interfaces
|
||||
* Maps should be `any`, not `interface{}` values
|
||||
|
||||
15
README.html
15
README.html
@@ -559,7 +559,7 @@ pre.rouge .gs {
|
||||
<div class="details">
|
||||
<span id="author" class="author">Brent Saner</span><br>
|
||||
<span id="email" class="email"><a href="mailto:bts@square-r00t.net">bts@square-r00t.net</a></span><br>
|
||||
<span id="revdate">Last rendered 2025-08-28 01:26:10 -0400</span>
|
||||
<span id="revdate">Last rendered 2025-09-30 14:15:01 -0400</span>
|
||||
</div>
|
||||
<div id="toc" class="toc2">
|
||||
<div id="toctitle">Table of Contents</div>
|
||||
@@ -575,7 +575,7 @@ pre.rouge .gs {
|
||||
<h2 id="ref"><a class="link" href="#ref">1. Reference</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>In addition to the documentation found in this document and <a href="https://wireproto.io/" target="_blank" rel="noopener">the specification</a>, library usage documentation can be found at <a href="https://pkg.go.dev/go.pkg.dev/r00t2.io/WireProto" target="_blank" rel="noopener">the Golang module documentation page</a>:</p>
|
||||
<p>In addition to the documentation found in this document and <a href="https://wireproto.io/" target="_blank" rel="noopener">the specification</a>, library usage documentation can be found at <a href="https://pkg.go.dev/r00t2.io/wireproto" target="_blank" rel="noopener">the Golang module documentation page</a>:</p>
|
||||
</div>
|
||||
<a href="https://go.pkg.dev/r00t2.io/wireproto">
|
||||
<img src="https://pkg.go.dev/badge/r00t2.io/wireproto.svg"
|
||||
@@ -659,6 +659,15 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>.Append*()</code> methods to append any type to any parent type. e.g. <code><Response>.AppendFVP(<FieldValuePair>)</code> would append an FVP to the most recent ResponseRecord to the most recent ResponseRecordGroup (or create if they don’t exist), <code><Response>.AppendRecord(…​)</code> for appending a record to most recent record group etc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Better/more strict interfaces</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Maps should be <code>any</code>, not <code>interface{}</code> values</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -666,7 +675,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2025-08-28 01:25:25 -0400
|
||||
Last updated 2025-09-25 17:54:36 -0400
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
12
README.md
12
README.md
@@ -3,7 +3,7 @@
|
||||
In addition to the documentation found in this document and [the
|
||||
specification](https://wireproto.io/), library usage documentation can
|
||||
be found at [the Golang module documentation
|
||||
page](https://pkg.go.dev/go.pkg.dev/r00t2.io/WireProto):
|
||||
page](https://pkg.go.dev/r00t2.io/wireproto):
|
||||
|
||||
# License
|
||||
|
||||
@@ -51,3 +51,13 @@ versions.
|
||||
- This is a relatively low priority as the passed `net.Conn` will
|
||||
likely return an error if its own context is canceled. This can
|
||||
be handled in the caller downstream.
|
||||
|
||||
- `.Append*()` methods to append any type to any parent type. e.g.
|
||||
`<Response>.AppendFVP(<FieldValuePair>)` would append an FVP to the
|
||||
most recent ResponseRecord to the most recent ResponseRecordGroup
|
||||
(or create if they don’t exist), `<Response>.AppendRecord(…)` for
|
||||
appending a record to most recent record group etc.
|
||||
|
||||
- Better/more strict interfaces
|
||||
|
||||
- Maps should be `any`, not `interface{}` values
|
||||
|
||||
10
funcs.go
10
funcs.go
@@ -92,7 +92,15 @@ func ReadConnResponse(conn net.Conn) (resp *Response, err error) {
|
||||
var size int
|
||||
var buf *bytes.Buffer = new(bytes.Buffer)
|
||||
|
||||
// First get the checksum.
|
||||
// Buffer in the status byte...
|
||||
b = make([]byte, 1)
|
||||
if _, err = conn.Read(b); err != nil {
|
||||
return
|
||||
}
|
||||
if _, err = buf.Write(b); err != nil {
|
||||
return
|
||||
}
|
||||
// Then get the checksum. Per spec, *all* responses *must* have a checksum.
|
||||
b = make([]byte, len(hdrCKSUM))
|
||||
if _, err = conn.Read(b); err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user