Post ASZpmlwAI0RZUhh08u by curtis@social.teci.world
 (DIR) More posts by curtis@social.teci.world
 (DIR) Post #ASZoDn1EAyfql8odii by alex@gleasonator.com
       2023-02-11T17:19:06.605006Z
       
       3 likes, 0 repeats
       
       I get what Websockets DO. What I don’t get is what they ARE. What does it mean to open a “persistent connection” over port 443? I always have a persistent connection because my computer is always hooked up to the internet and I can send messages any time. Also, how is it possible the server can send the client a message? Plz explain.
       
 (DIR) Post #ASZoHEmlOeG7kFh6sy by Bloomfer@coolsite.win
       2023-02-11T17:19:50.530388Z
       
       0 likes, 0 repeats
       
       I think you are a bit autistic over it
       
 (DIR) Post #ASZoKpVnJ0BiWCTCtc by matty@nicecrew.digital
       2023-02-11T17:20:28.327894Z
       
       0 likes, 0 repeats
       
       Maybe it means that it allows a port to stay open and listen for messages to be forwarded to a router?
       
 (DIR) Post #ASZob5bJFrXH3CnqRE by alex@gleasonator.com
       2023-02-11T17:23:19.818296Z
       
       0 likes, 0 repeats
       
       @matty Maybe it’s like when your browser is loading a slow page and you get a white screen, except it stops there and keeps loading forever but you can still send messages back and forth.
       
 (DIR) Post #ASZob7GT4K3KD94EEK by tk@bbs.kawa-kun.com
       2023-02-11T17:22:53.946088Z
       
       10 likes, 6 repeats
       
       @alex When a server and a client love each other very much…
       
 (DIR) Post #ASZoeHONs2qQUSHJmS by matty@nicecrew.digital
       2023-02-11T17:23:58.794234Z
       
       0 likes, 0 repeats
       
       Are websockets browser based?
       
 (DIR) Post #ASZoiur15vHK2Msjku by colinsmatt11@gleasonator.com
       2023-02-11T17:24:17.849444Z
       
       1 likes, 0 repeats
       
       @alex Because it's not using HTTP anymore. In a full duplex connection both sides can send and receive data simultaneously. It's a different protocol on top of TCP
       
 (DIR) Post #ASZotAg17aNc0QcvuS by alex@gleasonator.com
       2023-02-11T17:26:38.205992Z
       
       0 likes, 0 repeats
       
       @colinsmatt11 But what does that protocol look like? I tell the server “stay with me”? Do I poll it to remind it I’m still there? How does it know when I disconnect?
       
 (DIR) Post #ASZouj7IYlFB6q84lE by dragnucs@social.touha.me
       2023-02-11T17:25:37Z
       
       2 likes, 0 repeats
       
       @alex The server sends messages to the client by writing them on a note or directly on the bill. He then proceeds to deposit it on the clients table.
       
 (DIR) Post #ASZp3EVHkQZ6lqPAoa by radix023@noagendasocial.com
       2023-02-11T17:28:32Z
       
       0 likes, 0 repeats
       
       @alex let me give this a stab. First you have tables in the tcp stack on the client and the server that track tcp ports in use. (since tcp is a persistent connection vs a udp connection) The other element is that routers and firewalls along the way have those IP:port pairs also established. Most firewalls on client side will not allow packets from the outside unless it is either a) an open port or b) an established connection. The last definition is basic TCP: the syn;syn-ack;ack handshake.
       
 (DIR) Post #ASZp6LlxB9ZkBQgi5g by alex@gleasonator.com
       2023-02-11T17:29:00.139341Z
       
       1 likes, 0 repeats
       
       @colinsmatt11 The fact this is efficient on this server is amazing to me. A server can’t server thousands of HTTP connections at once, but it can keep open thousands of websockets no problem?
       
 (DIR) Post #ASZpAl3590ULjbnkBs by dragnucs@social.touha.me
       2023-02-11T17:29:21Z
       
       1 likes, 0 repeats
       
       @alex @colinsmatt11 Each side of the connection sends a heartbeat packet and each also has a timeout for receving each heartbeat. If the hartbeat drops after the timeout, then connection is considered closed. It stays open as long as there is a heartbeat.Regular HTTP connections get closed as soon as the message gets completely sent.
       
 (DIR) Post #ASZpIrFVyUiHHXTlGS by curtis@social.teci.world
       2023-02-11T17:31:20.436427Z
       
       2 likes, 0 repeats
       
       Establishing connections are more resource intensive than maintaining quiet persistent connections
       
 (DIR) Post #ASZpeLQYy50AxWtOPg by curtis@social.teci.world
       2023-02-11T17:35:13.779764Z
       
       1 likes, 0 repeats
       
       Long polling is kind of like that, where the connection timeout is infinite, and the server only responds to an HTTP request when something useful is ready to send.  That allows the lowest latency for alert notifications from the server via HTTPS protocolLong polling is not asynchronous, but low latency synchronous comms
       
 (DIR) Post #ASZpmlwAI0RZUhh08u by curtis@social.teci.world
       2023-02-11T17:36:45.874613Z
       
       0 likes, 0 repeats
       
       Maybe Gleason can explain it in layman terms for us mere mortals 😉
       
 (DIR) Post #ASZq9nqBNW9Q3fsO4e by darryl@reasonable.world
       2023-02-11T17:35:54Z
       
       1 likes, 0 repeats
       
       @alex I am so glad I get to contribute something. Old-school telecom programmer here: To put it simply it means that the connection is maintained by both ends, often with some sort of heartbeat sent back and forth at an interval to ensure it remains open and intact. That allows you to send data, streams, binary without any protocol overhead at the socket layer.
       
 (DIR) Post #ASa08TQwlTcK1F4rAG by billstclair@impeccable.social
       2023-02-11T19:27:04.039926Z
       
       1 likes, 0 repeats
       
       @alex Most TCP protocols have a client/server nature. The client connects, sends a request to the server, the server sometimes changes some internal state, then sends a response to the client. Even HTTP allows a connection to remain open after that, for sending further commands. Other than the initial request to connect and go to WebSocket mode, WebSockets have no concept of client and server. Each participant sends stuff, and the other reads and acts on it, sometimes sending something back.
       
 (DIR) Post #ASaXaf6uF1SKpUki5A by dave@gleasonator.com
       2023-02-12T01:47:32.857986Z
       
       0 likes, 0 repeats
       
       @ser @alex This is satirical, right?
       
 (DIR) Post #ASaXiMtHria6dg3aDY by dave@gleasonator.com
       2023-02-12T01:48:58.960581Z
       
       0 likes, 0 repeats
       
       @ser @alex Oh wait, it clearly is. I didn’t even read how you were defining these terms, just saw you invoking Ohm’s law and was like “is this guy serious?”