[edk2-devel] [NetworkPkg] Clarification on EFI_TCP6_PROTOCOL Destruction Behavior
Ayush Singh
ayushdevel1325 at gmail.com
Wed Jul 13 16:44:33 UTC 2022
Hello everyone. I am trying to implement Network Support in Rust std for
UEFI. While trying to use the TCP6_PROTOCOL, I am not quite sure how to
deal with destructing the protocol. Since TCP6_PROTOCOL is created using
a EFI_SERVICE_BINDING_PROTCOL, it should be destroyed using the
`DestroyChild()` method. However, do I also have to call
`TCP6_PROTOCOL->Close()` before this or will `DestroyChild()` do that
implicitly? If I do have to call this method myself, then do I need to
do `DestroyChild()` in the `CloseToken->Event->NotifyFunction` or is it
fine to `DestroyChild()` after calling `Close()` (event though `Close`
is nonblocking) ?
Also, it would be great if someone can point me to some TCP Network
applications. I did find some but most were either drivers, or were very
simple and did not do any Cleanup stuff.
Note: Rust does not need the user to close the connection manually. It
is closed once the object is dropped (which is done once the object
owner goes out of scope at compile time).
Yours Sincerely
Ayush Singh
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91318): https://edk2.groups.io/g/devel/message/91318
Mute This Topic: https://groups.io/mt/92361755/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list