Thanks. I'm not sure if I will use it directly, but it gives a very
good idea about using these protocols in Rust std.

On Wed, Jul 13, 2022 at 11:07 PM Kinney, Michael D
<[email protected]> wrote:
>
> It may be simpler to use the following lib class that layers on top of the 
> TCP protocols.
>
> https://github.com/tianocore/edk2/blob/master/NetworkPkg/Include/Library/TcpIoLib.h
>
> The implementation of this lib shows the correct sequence:
>
> https://github.com/tianocore/edk2/blob/master/NetworkPkg/Library/DxeTcpIoLib/DxeTcpIoLib.c
>
> It uses NetLib services too
>
> https://github.com/tianocore/edk2/blob/master/NetworkPkg/Library/DxeNetLib/DxeNetLib.c
>
> Mike
>
>
> > -----Original Message-----
> > From: Ayush Singh <[email protected]>
> > Sent: Wednesday, July 13, 2022 9:45 AM
> > To: [email protected]
> > Cc: Kinney, Michael D <[email protected]>; 
> > [email protected]; Gaibusab, Jabeena B
> > <[email protected]>; Yao, Jiewen <[email protected]>
> > Subject: [NetworkPkg] Clarification on EFI_TCP6_PROTOCOL Destruction 
> > Behavior
> >
> > 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 (#91322): https://edk2.groups.io/g/devel/message/91322
Mute This Topic: https://groups.io/mt/92361755/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to