mirror of
https://github.com/soypat/lneto.git
synced 2026-08-09 09:23:40 +00:00
5c54030f19
* add http/httphi * begin adding httphi tests * claude found neat bugs * add low level Handle function and more tests * more tests, run go generate * add Hijacker-like functionality * improve locking and acquisition of Exchanges in reconfiguring * several bugfixes, add internal.IntLen, round up http-linux example with new router API * small nit * add benchmarks * add query handling * remove ForEach pattern, allocates in TinyGo * massive documentation push and code reordering in files * Router.Handle returns error after being torn down * run go fix * rework Mux interface to receive a string request path * add MethodFrom * minor doc nit * fail on incomplete staging * add raw buffer access * add streaming API distinct from Exchange * begin adding multipart form logic * finish rounding up multipart form parsing * remove status type * first Multipart approach * begin adding readMultiPart * add Exchange.ReadMultiparts reimagining of clanker slop * ai insists with backoffs * simplify clanker slop * apply go fix * add a pattern argument to Mux * explicit header key/value alloc and add ExchangeConfig * fix tests after excplicit header alloc change * fix examples * run go fix * expose rawsock as experimental package (will use for external benchmarks) * remove backoff from form parsing * @MDr164 suggestions get potential fixes * apply go fix * add examples * add README.md * fix rawsock tinygo implementation * apply @MDr164 various fixes * update documentation on ContentLength methods and fix bug in Form reset on empty body * fix tests * add fuzz tests * run go fix * io.ErrNoProgress on parsing form spin * run go fix * remove backoff assumption from Router * httphi.Handle rejects unsupported protocols * go format router.go * add kvbuffer * rewrite Cookie with KVBuffer * mid refactor of KVBuffer into Header * work on KVBuffer exhausted semantics * add Go's ServeMux Request.PathValue access semantics to Exchange, Mux and MuxSlice * add PathValue example * document all the things; improve req Query semantics; add Form.EnableBufferGrowth * unexport kvBuffer * add Exchange.PathValueAppend * use stdlib in example instead of rawsock * remove rawsock from http example * add darwin arch rawsock * fix example * rename Router.TeardownGoroutines to Shutdown matching http.Server.Shutdown * rename types and identifiers * @MDr164 Content-Type and Transfer-Encoding bug catches
104 lines
3.3 KiB
Go
104 lines
3.3 KiB
Go
// Code generated by "stringer -type=State,OptionKind -linecomment -output stringers.go ."; DO NOT EDIT.
|
|
|
|
package tcp
|
|
|
|
import "strconv"
|
|
|
|
func _() {
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
// Re-run the stringer command to generate them again.
|
|
var x [1]struct{}
|
|
_ = x[StateClosed-0]
|
|
_ = x[StateListen-1]
|
|
_ = x[StateSynRcvd-2]
|
|
_ = x[StateSynSent-3]
|
|
_ = x[StateEstablished-4]
|
|
_ = x[StateFinWait1-5]
|
|
_ = x[StateFinWait2-6]
|
|
_ = x[StateClosing-7]
|
|
_ = x[StateTimeWait-8]
|
|
_ = x[StateCloseWait-9]
|
|
_ = x[StateLastAck-10]
|
|
}
|
|
|
|
const _State_name = "CLOSEDLISTENSYN-RECEIVEDSYN-SENTESTABLISHEDFIN-WAIT-1FIN-WAIT-2CLOSINGTIME-WAITCLOSE-WAITLAST-ACK"
|
|
|
|
var _State_index = [...]uint8{0, 6, 12, 24, 32, 43, 53, 63, 70, 79, 89, 97}
|
|
|
|
func (i State) String() string {
|
|
idx := int(i) - 0
|
|
if i < 0 || idx >= len(_State_index)-1 {
|
|
return "State(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
return _State_name[_State_index[idx]:_State_index[idx+1]]
|
|
}
|
|
func _() {
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
// Re-run the stringer command to generate them again.
|
|
var x [1]struct{}
|
|
_ = x[OptEnd-0]
|
|
_ = x[OptNop-1]
|
|
_ = x[OptMaxSegmentSize-2]
|
|
_ = x[OptWindowScale-3]
|
|
_ = x[OptSACKPermitted-4]
|
|
_ = x[OptSACK-5]
|
|
_ = x[OptEcho-6]
|
|
_ = x[optEchoReply-7]
|
|
_ = x[OptTimestamps-8]
|
|
_ = x[optPOCP-9]
|
|
_ = x[optPOSP-10]
|
|
_ = x[optCC-11]
|
|
_ = x[optCCnew-12]
|
|
_ = x[optCCecho-13]
|
|
_ = x[optACR-14]
|
|
_ = x[optACD-15]
|
|
_ = x[optSkeeter-16]
|
|
_ = x[optBubba-17]
|
|
_ = x[OptTrailerChecksum-18]
|
|
_ = x[optMD5Signature-19]
|
|
_ = x[OptSCPSCapabilities-20]
|
|
_ = x[OptSNA-21]
|
|
_ = x[OptRecordBoundaries-22]
|
|
_ = x[OptCorruptionExperienced-23]
|
|
_ = x[OptSNAP-24]
|
|
_ = x[OptUnassigned-25]
|
|
_ = x[OptCompressionFilter-26]
|
|
_ = x[OptQuickStartResponse-27]
|
|
_ = x[OptUserTimeout-28]
|
|
_ = x[OptAuthetication-29]
|
|
_ = x[OptMultipath-30]
|
|
_ = x[OptFastOpenCookie-34]
|
|
_ = x[OptEncryptionNegotiation-69]
|
|
_ = x[OptAccurateECN0-172]
|
|
_ = x[OptAccurateECN1-174]
|
|
}
|
|
|
|
const (
|
|
_OptionKind_name_0 = "end of option listno-operationmaximum segment sizewindow scaleSACK permittedSACKecho(obsolete)echo reply(obsolete)timestampspartial order connection permitted(obsolete)partial order service profile(obsolete)CC(obsolete)CC.new(obsolete)CC.echo(obsolete)alternate checksum request(obsolete)alternate checksum data(obsolete)skeeterbubbatrailer checksumMD5 signature(obsolete)SCPS capabilitiesselective negative acksrecord boundariescorruption experiencedSNAPunassignedcompression filterquick-start responseuser timeout or unauthorized useAuthentication TCP-AOmultipath TCP"
|
|
_OptionKind_name_1 = "fast open cookie"
|
|
_OptionKind_name_2 = "encryption negotiation"
|
|
_OptionKind_name_3 = "accurate ECN order 0"
|
|
_OptionKind_name_4 = "accurate ECN order 1"
|
|
)
|
|
|
|
var (
|
|
_OptionKind_index_0 = [...]uint16{0, 18, 30, 50, 62, 76, 80, 94, 114, 124, 168, 207, 219, 235, 252, 288, 321, 328, 333, 349, 372, 389, 412, 429, 451, 455, 465, 483, 503, 535, 556, 569}
|
|
)
|
|
|
|
func (i OptionKind) String() string {
|
|
switch {
|
|
case i <= 30:
|
|
return _OptionKind_name_0[_OptionKind_index_0[i]:_OptionKind_index_0[i+1]]
|
|
case i == 34:
|
|
return _OptionKind_name_1
|
|
case i == 69:
|
|
return _OptionKind_name_2
|
|
case i == 172:
|
|
return _OptionKind_name_3
|
|
case i == 174:
|
|
return _OptionKind_name_4
|
|
default:
|
|
return "OptionKind(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
}
|