Có phải Pusher của pusher.com hoạt động dựa trên websocket?

cho mình hỏi có phải dịch vụ pusher hoạt động dựa trên websocket phải ko nhỉ, mình xem qua mấy tutorial dạy cách làm app chat realtime dùng dịch vụ này nhưng vẫn ko hiểu thực sự có đúng là nó hoạt động dựa trên websocket ko, mình có tìm hiểu thì để làm dạng app realtime như này thì server phải có khả năng push message về cho client mà muốn làm được điều đó thì hoặc là dùng websocket hoặc dùng polling hoặc dùng chức năng server push message của http/2,
mình đoán thế này có đúng ko: client >> kết nối đến pusher bằng websocket, server kết nối đến pusher bằng websocket , client và server sẽ tương tác với nhau thông qua pusher?

Cậu thử đọc blog của Pusher xem :smile: Tớ thấy họ có mô tả khá kỹ càng đó :smile:

Currently, Pusher offers WebSocket, Flash and HTTP transports.

As mentioned in the previous post, there are many things a strategy has to do:

  • check whether a transport is supported in a browser,
  • connect using a specific transport,
  • retry connection attempts,
  • start connecting after a delay,
  • try different connections in parallel,
  • cache and retrieve transport info from local storage.

Hope it helps!

5 Likes

thanks bạn …

1 Like
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?