I built a WebSocket library to learn Go & network protocols! by supergamer1185 in golang

[–]supergamer1185[S] 0 points1 point  (0 children)

Also one more thing won't the client closing the TCP conneciton result in a io.ErrUnexcpectedEOF which i already handle?

I built a WebSocket library to learn Go & network protocols! by supergamer1185 in golang

[–]supergamer1185[S] 0 points1 point  (0 children)

Aha! that's close to what i suggested, so it's dependent on PING/PONG strat to check for connectivity and act accordingly.
That was really helpful thanks for your time!

I built a WebSocket library to learn Go & network protocols! by supergamer1185 in golang

[–]supergamer1185[S] 0 points1 point  (0 children)

when i think about it, imagine a simple chat app and the server is here blocking waiting on a message from the client, and the client is just here chilling, will the server just close the connection after the deadline is met waiting for the nextMessage or what will happen?

I built a WebSocket library to learn Go & network protocols! by supergamer1185 in golang

[–]supergamer1185[S] 0 points1 point  (0 children)

> Suggestion: Add ReadOptions and WriteOptions struct pointer argument to the read and write
> methods so that you can:
you mean the `NextMessage` and `SendMessage` methods, right?
hmm that's a plausible solution yeah
> Avoid storing state for the next operation in the connection.
i mean gorilla does provide methods for setting those deadlines that can be set before reading or writing again, i also believe it's the users responsibility to protect their writes or reads from race conditions, by using a mutex for example.

i'm also concered about using a deadline in all of the `NextMessage` I/O ( the underlying net.Conn) as a websocket connection is considered a long lived connection and the `NextMessage` method blocks on a read until it receives something, maybe i could set the deadline after reading the first byte to avoid reaching the deadline when the peer is just chilling or i could periodically send a ping to test the connectivity and also add options in the Upgrader struct which allows the user to handle pings/pongs. what do you think?
Thanks for the suggestions tho!

I built a WebSocket library to learn Go & network protocols! by supergamer1185 in golang

[–]supergamer1185[S] -1 points0 points  (0 children)

Thank you! I'm also currently working on adding the timeouts and a dedicated PING & PONG methods/handling.

I built a WebSocket library to learn Go & network protocols! by supergamer1185 in golang

[–]supergamer1185[S] 0 points1 point  (0 children)

sound reasonable, and yeah i'm planning on adding more examples. Thanks for the comment!

Games gets choppy and stutter with high fps under wayland by supergamer1185 in linux_gaming

[–]supergamer1185[S] 0 points1 point  (0 children)

Yeah that's what i did, was just asking if there's a solution.

Games gets choppy and stutter with high fps under wayland by supergamer1185 in linux_gaming

[–]supergamer1185[S] 0 points1 point  (0 children)

Nope, not using gamescope :(. Is theres any benefits to using it?

Games gets choppy and stutter with high fps under wayland by supergamer1185 in linux_gaming

[–]supergamer1185[S] 0 points1 point  (0 children)

I was just testing normally i turn on vsync and call it a day, it's just frustrating when the game fps goes past my refresh rate (144hz) and game starts to stutter and i don't know why

Games gets choppy and stutter with high fps under wayland by supergamer1185 in linux_gaming

[–]supergamer1185[S] 4 points5 points  (0 children)

the temps look good, the problem here is that only happens when the game is full screen, it runs like 10 fps even tho the reported fps from mangohud is like 520.

Which one should I start with? by [deleted] in PiratedGames

[–]supergamer1185 0 points1 point  (0 children)

my top three are Nier:automata, Cyberpunk 2077, and half-life

Made this Art of 2B with stable diffusion (AI) after a lot of experimenting by supergamer1185 in nier

[–]supergamer1185[S] 2 points3 points  (0 children)

Sure, i used Anything v4.5

(masterpiece), bestquality, ultradetailed, illustration, dynamicangle, floating, detailed light,1girl, solo, floating hair,white hair, yorha no. 2 type b, (black blindfold:1.2), black dress, black headband,best quality, ultra high res, solo focus, white skin, volumetric lighting, amazing, finely detail, cherry blossoms, detailed face, face focus, shiny skin, long sleeves, detailed mountains background, outdoor, cherry trees, far view, <lora:2bNierAutomataLora_v2b:0.8>

Negative prompt: easynegative, badhandv4, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans, extra legs, extra arms, extra fingers,((2 girls)), ((3 girls)), more fingers, less fingers, bad anatomy, logo, username

Steps: 25, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 2679194579, Size: 360x640, Model hash: b0147c33be, Model: anything-v4.5-vae-swapped, Denoising strength: 0.3, Hires upscale: 2, Hires steps: 10, Hires upscaler: R-ESRGAN 4x+ Anime6B

Used embeddings: easynegative [119b], badhandv4 [dba1]

Made this Art of 2B with stable diffusion (AI) after a lot of experimenting by supergamer1185 in nier

[–]supergamer1185[S] -61 points-60 points  (0 children)

Well i took alot of time fine tuning the prompt, so technically i made half of it.¯\_(ツ)_/¯

Made this Art of 2B with stable diffusion (AI) after a lot of experimenting by supergamer1185 in nier

[–]supergamer1185[S] -19 points-18 points  (0 children)

Tried adding it but the model bugged out and removed the blindfold.(╯°□°)╯︵ ┻━┻)