public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ayush Singh" <ayushdevel1325@gmail.com>
To: devel@edk2.groups.io
Cc: michael.d.kinney@intel.com, mikuback@linux.microsoft.com,
	jabeena.b.gaibusab@intel.com, jiewen.yao@intel.com
Subject: [NetworkPkg] Clarification on EFI_TCP6_PROTOCOL Destruction Behavior
Date: Wed, 13 Jul 2022 22:14:33 +0530	[thread overview]
Message-ID: <a7b2efcb-f837-70f7-491e-52f56346ba16@gmail.com> (raw)

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


             reply	other threads:[~2022-07-13 16:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 16:44 Ayush Singh [this message]
2022-07-13 17:36 ` [NetworkPkg] Clarification on EFI_TCP6_PROTOCOL Destruction Behavior Michael D Kinney
2022-07-13 18:30   ` Ayush Singh
2022-07-15 21:03     ` Ayush Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7b2efcb-f837-70f7-491e-52f56346ba16@gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox