Re: [PATCH] NetworkPkg: Add HTTP Additional Event Notifications


Heng Luo
 

Thank Jiaxin, the patch V2 is sent out following Jiaxin's comment.

-----Original Message-----
From: Wu, Jiaxin <jiaxin.wu@...>
Sent: Tuesday, July 20, 2021 9:45 AM
To: Luo, Heng <heng.luo@...>; devel@edk2.groups.io
Cc: Maciej Rabeda <maciej.rabeda@...>; Fu, Siyuan
<siyuan.fu@...>
Subject: RE: [PATCH] NetworkPkg: Add HTTP Additional Event Notifications

For the below EDKII_HTTP_CALLBACK_EVENT definition:

All event is to retrieve the event Status, so the comments should be made clearly
and align with code returned status, for example,

+ /// Retrieve the host address, EventStatus:
There might be the misunderstanding you want the host address, but actually,
you only want the status. It's better to be:

+ /// The Status of DNS Event to retrieve the host address.
The same to all event.


With above changes, the patch is good to me.



Thanks,
Jiaxin





+///

+/// EDKII_HTTP_CALLBACK_EVENT

+///

+typedef enum {

+ ///

+ /// Retrieve the host address, EventStatus:

+ /// EFI_SUCCESS Operation succeeded.

+ /// EFI_OUT_OF_RESOURCES Failed to allocate needed resources.

+ /// EFI_DEVICE_ERROR An unexpected network error occurred.

+ /// Others Other errors as indicated.

+ ///

+ HttpEventDns,

+

+ ///

+ /// Initiate a nonblocking TCP connection request, EventStatus:

+ /// EFI_SUCCESS The connection request is successfully initiated.

+ /// EFI_NOT_STARTED This EFI TCP Protocol instance has not been
configured.

+ /// EFI_DEVICE_ERROR An unexpected system or network error
occurred.

+ /// Others Other errors as indicated.

+ ///

+ HttpEventConnectTcp,

+

+ ///

+ /// Connect one TLS session by finishing the TLS handshake process,
EventStatus:

+ /// EFI_SUCCESS The TLS session is established.

+ /// EFI_OUT_OF_RESOURCES Can't allocate memory resources.

+ /// EFI_ABORTED TLS session state is incorrect.

+ /// Others Other error as indicated.

+ ///

+ HttpEventTlsConnectSession,

+

+ ///

+ /// Initialize Http session

+ /// EFI_SUCCESS The initialization of session is done.

+ /// Others Other error as indicated.

+ ///

+ HttpEventInitSession

+} EDKII_HTTP_CALLBACK_EVENT;

+

Join devel@edk2.groups.io to automatically receive all group messages.