HomePhabricator
Diffusion Comm 663dd8c0d704

[CommCoreModule] Call `onopen` and `onclose` callback from…

Tags
None
Referenced Files
F12843: f077.png
Feb 8 2022, 5:11 AM
Subscribers
None

Description

[CommCoreModule] Call onopen and onclose callback from ClientGetReadReactor

Summary: Execute (well queue up on JS event thread) the onopen callback when the OnReadInitialMetadataDone lifecycle event is hit by gRPC. Do the same for onclose callback when the OnDone lifecycle event is hit.

Test Plan:

  1. Call openSocket
  2. Assign .onopen callback
  3. Assign .onclose callback
  4. Make sure .onopen callback fires (console log something)
  5. Call socket.close()
  6. Make sure the .onclose callback fires (console log something)

f077.png (260×660 px, 50 KB)

Reviewers: ashoat, palys-swm, def-au1t, varun, karol-bisztyga, jimpo

Reviewed By: ashoat, karol-bisztyga

Subscribers: Adrian, benschac

Differential Revision: https://phabricator.ashoat.com/D3123

Details