How to Implement Server-Sent Events in Go

Поделиться
HTML-код
  • Опубликовано: 27 дек 2024

Комментарии •

  • @prashlovessamosa
    @prashlovessamosa 2 месяца назад +2

    What an explanation thanks buddy.

  • @kaihendry
    @kaihendry 2 месяца назад +5

    Fantastic tutorial

    • @packagemain
      @packagemain  2 месяца назад +1

      Thanks, glad you liked it!

  • @scroogle
    @scroogle Месяц назад +1

    What IDE are you using?

  • @trifalgarh
    @trifalgarh 2 месяца назад +1

    One of the use cases that I can imagine with server sent events would be pushing a scan command to our security agent running in all our clients. So scheduled scan events can be triggered by server anytime and responses can be sent back.
    On the flip side it can also act as a C2 for some malware. Conditionally triggering different functions on the client side.
    What do you think? Or is there a better way to achieve these tasks?

    • @packagemain
      @packagemain  2 месяца назад +1

      With SSE you won't be able to get the responses back since the communication is unidirectional, only server to client. Otherwise yes, something like that is possible.

  • @kurshadqaya1684
    @kurshadqaya1684 2 месяца назад

    Thank you!

  • @NaveenSiddareddy
    @NaveenSiddareddy Месяц назад +1

    any value of *http.Request int he handler in SSE case?

    • @packagemain
      @packagemain  Месяц назад

      Great question. Not in my example maybe, but it's a normal HTTP request, so you can read headers from there for example, such as Authorization etc.