Bounce (n.) = [info-sci]: a break in thought-progress as a result of missing a required library. Eg: “I suffered from a 3 month bounce from Web.Sockets-prog, in order to learn how classes and objects work, in PHP.”
H2-H4S1: How 7 bits can encode an integer of 3 decimal-points, in order to understand how to decode the payload-len specifier, in the settings header # of the payload:
X.ref<WP.MIC-H2S78,H3S1.H4S1-H5S1> Wang: The WebSocket Protocol encodes frame lengths using a variable number of bits, which allows small messages to use a compact encoding while still allowing the protocol to carry medium-sized and even very large messages. For messages under 126 bytes, the length is packed into one of the first two header bytes. For lengths between 126 and 216, two extra bytes are used. For messages larger than 126 bytes, eight bytes of length are included. The length is encoded in the last seven bits of the second byte of the frame header. The values 126 and 127 in that field are treated as special signals that additional bytes will follow to complete the encoded length. <Definitive HTML.5-Web,Sockets> Hu: 7 bits is only to encode lengths of 126 bytes or lower [inclusive or no?]; for numbers larger than 126, more bytes, 2 or 8, [at what intervals?], are used, presumably, because more bits are required to encode larger numbers.
RFC.6455-5,2: The length of the “Payload data”, in bytes: if 0-125, that is the payload length. If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length. Hu: This paragraph seems to contradict, at least to some extent, the one by Wang, but maybe I’m mis-interpreting. Where’s the number 216? Why do you need an additional 2 bytes to define the length of a 126 byte payload, when 126 is the length, or is length a separate vector from storage size? Perhaps that’s what it’s suggesting!? Is “if 127” if 127, or higher, or is 127 the maximum size? Very confused.
H5S1: Simple-red: Since I’m sending one character at a time, and one character, presumably, can be encoded in 125 bytes or fewer, then I can assume for my purposes that the payload length specifier will always be 7 bits, and therefore, the total header, no more than 2 bytes, exactly, always, for now. However, it’s clear that I need to conditionally write that length differently, and I need to encode characters as bits into bytes, as part of preparing messages for the encode. This is raw | data transfer.
H5S2: <openmymind.net>: WebSocket uses the first 7 bits of its 2nd byte to support a variable-length (?!) length prefix. When those bits are<Hu-terlude[fbno]: encode an integer that is> equal or less than 125, then the length of the payload is this value itself. When<Hu-terlude: your program reads these 7> the bits<same-correction> equal 126, then<Hu: your program should # insert a reading of the> the next 2 bytes<Hu: as an indicator of> indicate the length of the payload. When the bits<😡> equal 127, the the next 8 bytes indicate the length of the payload. Hu: Therefore #, integer.equated-bits of # 126 and 127 are not, in themselves, length statements; the number 126 would be encoded by a 2.byte-phrase, as would 127 # Rather, these are pass | codes to move to the next byte-seq, and they could be any other number, that is greater than 125. <openmymind.net>: <Hu.de-code: The integer corresponding to the lengths, in bytes, as the unit, of> messages <Hu: whose lengths, by this unit, are> greater than 125 bytes and less than 64,000 will require 3 bytes <Hu> 2 bytes to encode, and be prefaced<s-r> by the 126 pass | code, in the 2.byte-header # Hu: Messages that are 64,000 and greater, according to <openmymind.net><anthropology!> will require 8 bytes to encode.
H4S2: How can 0x48 = H, what does this have to do with “opcode”, is “opcode” specific or general, how does this relate to binary?<RFC.6455-5,7>:
o A single-frame unmasked text message
* 0x81 0x05 0x48 0x65 0x6c 0x6c 0x6f (contains "Hello")
o A single-frame masked text message
* 0x81 0x85 0x37 0xfa 0x21 0x3d 0x7f 0x9f 0x4d 0x51 0x58
(contains "Hello")
o A fragmented unmasked text message
* 0x01 0x03 0x48 0x65 0x6c (contains "Hel")
* 0x80 0x02 0x6c 0x6f (contains "lo")
[Answered]: H4S3: What is the value of FIN, if it’s the final | fragment? Ie it is a stand-alone #
Wang<pg-46, a-r>: To transmit an incomplete message, you can send a frame that has the fin bit set to zero. The last frame has the fin bit set to 1, indicating that the message ends with that frame’s payload. Hu: Since I’m only sending individual messages, for now, the FIN bit will be set to 1, for all messages.
H4S4: How can I pass a Web.Socket-payload from server-server? Can this be done without unmasking, at the first server?
H4S5: According to RFC.6455-5,2, closing a web-socket involves setting opcode=8<base.10-int>. RFC-6455: “%x8 denotes a connection close” Hu: Does this mean that opening the connection also involves sending a frame-payload that is encoded in the same fashion? Are headers sent with the same base.frame-protocol as described in RFC.6455-5,2?
H4S5: How do I convert a text-string, with alphabet-chars, into binary?
Check this: https://stackoverflow.com/questions/6382738/convert-string-to-binary-then-back-again-using-php
H4S6: In WAMP, how do I set a file to have the URL ws://www.example.com/socketserver
? Or without www #, if needed.
Asking a human what time he plans to each lunch tomorrow is a 30 second response-request. Figuring out what time a chimp will eat lunch tomorrow, at
Check this: https://stackoverflow.com/questions/34725380/how-do-i-find-out-the-websocket-url-of-my-server
https://stackoverflow.com/questions/68184227/what-should-i-put-in-the-websocket-url
- “Your server is listening to port 5000 on your localhost. So if you want to connect to the server, you have to put either “ws://localhost:5000” or “ws://127.0.0.1:5000″”

<anthropology!> https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers
- A WebSocket server is nothing more than an application listening on any port of a TCP server that follows a specific protocol.
- For example, let’s assume that your server is listening on
example.com
, port 8000, and your socket server responds toGET
requests atexample.com/chat
. - The server may listen on any port it chooses, but if it chooses any port other than 80 or 443, it may have problems with firewalls and/or proxies.
GET /chat HTTP/1.1
Host: example.com:8000
RFC.6455-1,3: The “Request-URI” of the GET method [RFC2616] is used to identify the endpoint of the WebSocket connection, both to allow multiple domains to be served from one IP address and to allow multiple WebSocket endpoints to be served by a single server.

https://www.rfc-editor.org/rfc/rfc2616#section-6
Hu: Did any previous handlers tag a species on this one? Watson: Here’s the data I have: “Hypertext Transfer Protocol — HTTP/1.1“, b-1999. Hu: Hmm, we don’t have any genus data beyond the Order? Watson: Doesn’t look like it. 😔
- HTTP has been in use by the World-Wide Web global information initiative since 1990. This specification defines the protocol referred to as “HTTP/1.1”, and is an update to RFC 2068
Watson: Ch-4 specifies an HTTP message; ch-5: request; ch-6: response. 9.3 has some specific information on GET.
- 9.3: The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
- 3.2.1: URIs in HTTP can be represented in absolute form or relative to some known base URI [11], depending upon the context of their use. The two forms are differentiated by the fact that absolute URIs always begin with a scheme name followed by a colon. For definitive information on URL syntax and semantics, see “Uniform Resource Identifiers (URI): Generic Syntax and Semantics,” RFC 2396 [42] (which replaces RFCs 1738 [4] and RFC 1808 [11]). This specification adopts the definitions of “URI-reference”, “absoluteURI”, “relativeURI”, “port”, “host”,”abs_path”, “rel_path”, and “authority” from that specification.
- 3.2.2: If the port is empty or not given, port 80 is assumed. Watson/Hu<fbno>: Not sure if this is relevant.
- 4.1 “Message-types”: HTTP | messages consist of requests from client to server and responses from server to client.
- 5.3 “Request.header-fields”: The request-header fields allow the client to pass additional information about the request, and about the client itself, to the server. These fields act as request modifiers, with semantics equivalent to the parameters on a programming language method | invocation. Hu: This monkey has a specifier on Latin to Anglo ratio, but the semantics | accuracy of overall sentence construction strikes at only about 70%. What is its relative status in the pack? Watson: Berners-Lee is the alpha-monkey of this pack. Hu: Hmm, decrease the survivability estimate to 3 years from inception. Watson. This was published 23 years ago. Hu: Interesting, let’s see if we can study that extended survivability and apply at medical secrets to human civilizations. Watson: Will do.
Hu: In section 6-response, which is just a no.subsection-section<fbno>, the server does not need to specify a URI in its response. That means, let’s just say, as a simplification, that it “knows” when it’s getting a GET request and responds to the source, with a standard response. Watson: Smashing. Your astounding deduction into the monkeys’ primal behavioral roots has moved this field forward by 30 years. Hu: I’ve learned from the best: <r: Padrell, 2020>
Success. In Model 2, the comparison between full and null models was significant (GLMM: χ2 = 15.84, df = 8, p = 0.045). All personality traits in interaction with sex predicted chimpanzees’ success (Extraversion*sex: p = 0.012; Neuropsychoticism*sex: p = 0.003; Dominance*sex: p < 0.001), but the test predictor age was not significant. In particular, lower Extraversion slightly increased the probability of being successful in males, while highly increasing it in females (see Table 6; Fig. 2). Similarly, lower Dominance predicted a higher probability of success in both sexes, but this effect was stronger in females (see Table 6; Fig. 3). Finally, higher Neuropsychoticism predicted a higher probability of female success, but a slightly lower probability of success in males (see Table 6; Fig. 4).
Hu: It’s amazing how much detail these zoologists can ascertain from creatures that don’t speak our language, just from making granular observations of their guttural noises. Watson: True, but you have to account for the fact that they have 30+ years of longitudinal data. The near term observations might be just as confusing. Hu: More confusing than this? I doubt it. Clearly, we have a lot to learn from them. Watson: Will purchase the last 50 books published on chimps by a credible university press. Hu: I want books on animals, not the PHP tutorials we just bought. Watson: LOL.
- 5.1.2 Request-URI: The Request-URI is a Uniform Resource Identifier (section 3.2) and identifies the resource upon which to apply the request.
Hu: My concern is that if we assume left nipple scratch means that the monkey wants the acorn, we might misinterpret about 20% of its subsequent behaviors. Watson: True, and that could lead to a false isolation of that monkey, further disruption our ability to observe it naturally<Schrodinger!><#n-p> Hu: It seems like “resource” means the script file in which we’ve written the response to the HTTP request, incoming. Watson: Pretty much the same thing. Hu: Let’s look for consilience signs, like right ear scratch, and maybe the left middle toe. Watson: Based on our historical data, the left middle toe is only touched about once every 12 hours by this species. Hu: #!%#$%#, we’ll have to wait it out.
- 5.1.2: The asterisk “*” means that the request does not apply to a particular resource, but to the server itself, and is only allowed when the method used does not necessarily apply to a resource. One example would be
OPTIONS * HTTP/1.1
Hu: Goodness gracious, Watson, this one clearly has severe grade 4 damage to its Broca’s area. Watson: I know, but it’s the only one that produces this behavior. Hu: I told you, we can’t be working with samples of this quality if we want to qualify for the next NIH grant. Watson: Perhaps we can adjust the sample with some sort of regression. Hu: What do you think I am, a wizard? You can’t just say the word “regression” and expect the data the magically become viable. Watson: Shall I discard the sample then? Hu: No, leave it there. Obviously, the server is a resource, so adjust for the fact that this monkey is not using standard | English. Watson: Certainty has moved up to 80%, from 65%. Hu: We need 95%. Take the toy | stethoscope off its uniform, I’m distracted by the fact that it’s associated with a position of credibility. Watson: Doesn’t change the certainty, but helps with any psycho-shrekage. Hu: Precisely: Well, we are planning to write a HTTP-response in a particular script; the client-side has to receive that response, in order for the Web.Sockets-conn to be established. Just pulling from the literature here. That response obviously has to come from a specific file, because it’s in code, so that means we should specify a file. Obviously, this is dependent on multiple levels of prior assumptions. Watson: Reminds me of this:<Wilson, 2017>
The linear model revealed that males were rated as significantly lower in conscientiousness than females (b = −0.91, 95 % CI −1.80 to −0.02, p = 0.044), that chimpanzees homozygous for the short form of the allele were significantly lower in conscientiousness than chimpanzees who possessed the long form (b = −0.73, 95 % CI −1.37 to −0.08, p = 0.028), and that there was no significant sex × genotype interaction (b = 0.76, 95 % CI −0.27 to 1.79, p = 0.14). Trace plots for the animal model did not suggest the presence of autocorrelations and density plots indicated that the distributions around the estimates were approximately normal. Again, the data used to create these plots is available at https://github.com/alexweissuk/avpr1a-chimpanzee.git.
Hu: When the behavior becomes deranged, we have to rely on deeper principles of genetics and evolutionary biology to bridge the expression-gap<#n-p> Watson: Will apply that to our decision.making-paradigm, for this type of investigation. Hu: Thanks.
- The absoluteURI form is REQUIRED when the request is being made to a proxy.
Hu: AbsoluteURI is what I’d prefer to use, assuming that means what I think it does, in a situation when the behavior is unpredictable #, but we’re not using a proxy. However, this sentence does not state that an AbsoluteURI is not allowed, when not using a proxy. Watson: Don’t think you that conforming to the logical rule of double negative is too advanced for this species? Hu: Agreed. Based on our prior semantics-accuracy analysis, I’d say there’s an 80% chance that this is viable. Watson: Will note that assumption, and move forward with an experiment to confirm #
- An example Request-Line would be:
GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1
- To allow for transition to absoluteURIs in all requests in future versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies.
Watson: Bridger just sent a novel observation in through the post ^ Hu: My Heavenly-objs, this confounds things significantly. Watson: True, but it’s a 95% observation, hard to disregard. Hu: The first 2 clauses are straightforward, despite being a run-on, they want to move in the direction of using, and supporting absoluteURIs, primarily, due to scalability and cross.domain-requests, unconsciously, obviously. Watson. Obviously. Hu: The third clause can be interpreted as prescriptive, let’s establish 50% certainty on that for now, and also predictive, based on historical information that nobody in this industry builds both the client and the server. Watson: Noted. Shall we move forward with testing an absoluteURI first? Hu: That would probably be wise. The issue is # that this forces us to segment our testing by an additional level of granularity, and this will force us to extend our time estimate. Watson: That’ll be the 10th time, in the last 3 days. Hu: We have no choice. There is clearly more literature on HTTP requests in general, so I say we write one without opening a Web.Sockets-conn, and then move on, to the next testing segment. Since HTTP 1.1 came out in 1999, there is significantly more literature, to a point of 95% certainty. The more that we can segment out well.supported-literature, the more we can isolate the problem points, that are particular to Web-Sockets<WP.MIC-H2S88>
H4S7: What kind of db do browsers use to store your history?
H4S8: What is actually connected in a Web.Sockets-conn?
Is it the script files, or is the stream a bit more “flexible” than that, or is it, simply the objects as the stream resources?<WP.MIC-H2S80,H3S4.H4S3>
References:
https://www.openmymind.net/WebSocket-Framing-Masking-Fragmentation-and-More/
https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers
https://blog.michael-lawrence-wilson.com/category/field-sites/gombe/ “Do monkeys have dialects?” Hu: On this server, all the monkeys speak JavaScript.
https://www.rfc-editor.org/rfc/rfc6455
https://www.rfc-editor.org/rfc/rfc2616#section-6
Padrell, Maria et al. “Personality, cognition and behavior in chimpanzees: a new approach based on Eysenck’s model.” PeerJ vol. 8 e9707. 17 Aug. 2020, doi:10.7717/peerj.9707
Wilson, V A D et al. “Chimpanzee Personality and the Arginine Vasopressin Receptor 1A Genotype.” Behavior genetics vol. 47,2 (2017): 215-226. doi:10.1007/s10519-016-9822-2