From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mx.groups.io with SMTP id smtpd.web08.185.1657730678642121685 for ; Wed, 13 Jul 2022 09:44:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a15djSC5; spf=pass (domain: gmail.com, ip: 209.85.216.51, mailfrom: ayushdevel1325@gmail.com) Received: by mail-pj1-f51.google.com with SMTP id s21so12848127pjq.4 for ; Wed, 13 Jul 2022 09:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:content-language:to:cc:from :subject:content-transfer-encoding; bh=9c6FroZYT1d/UiuS4znXC8xa5cIUD4MgpmWfJejdS8I=; b=a15djSC5F4/aJFylW9YXRmEBPBQaDo8anbGLaK+myUTFVNigcP1p1SOgPfB1gUnzKP SL31javbOGodRSmJ2RTmZhTmrtLs/f0X+1vz1HKeQu59VWbuyVLyxhpmnBEWQN7zJDPO 2kEF74diSdqz2FNNLOByHaNdNnFWfKWnKhSfCAchzMb7i3LpfTHTzb1LUZx2YrNirqV3 wwwSQPCGuSlBgnMT6YMXMRe2hxeKxY0+esPmDHErh63braY7dmD50kCMSUKTgVog8Omx 1QQ22YHpjgD7gtaQ2hAJd43y/QHrz+77Tp6y9I4/cLcv9CC+xTEd3AP9xMy0c9s1jHMk 76oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:from:subject:content-transfer-encoding; bh=9c6FroZYT1d/UiuS4znXC8xa5cIUD4MgpmWfJejdS8I=; b=2pGKBr7UzRqy1qLCLCpq2R87y1ju6fEoAdHCunsm3MvjmGRQCpKkDAKkqzGWg++/sL vReL0g3vMtnXKHoMDGK3H3TfJufleWfPsLEGxDUs3O4VVB2DtVbVhElrxSn00C0IB8cW 2F6OCw/5t9Iv81IjASbD+XMuQexuhRpn2Iv6rlBCUwbzzngfojRcq/MnuGO/KUuOB5ai lPoaBbZkd10qxnDIABi0wGw3dkdSZi4nHuSCunok5rqu7EaZiRjOuBDdzoJ26gv2kJ2+ /MGC8sTfpAlxckgOs/cN250Q8kaimTRj5D4CMDVt4Y9guGO2zd0rtTWSvwDd/EK39u4v VYWg== X-Gm-Message-State: AJIora9QDCkC8C3EJpLr8Z4tTjAjpcM8j1lUwBQj5nbMtzd8dxXHL0Fj bjWoBCXqfElAYw9EBWETFAPejObbiOk= X-Google-Smtp-Source: AGRyM1sFCIhbcWVWsL59gfBjA8OFyyW4Wb4dh3uJVCWsS18f2pr0DRg1HR68JWB0z9Bi+zkZyPW9+Q== X-Received: by 2002:a17:902:f152:b0:16b:e29c:fbd5 with SMTP id d18-20020a170902f15200b0016be29cfbd5mr4094555plb.67.1657730677862; Wed, 13 Jul 2022 09:44:37 -0700 (PDT) Return-Path: Received: from ?IPV6:2401:4900:1f3e:2e8d:c9ea:4f84:eaf8:6bbf? ([2401:4900:1f3e:2e8d:c9ea:4f84:eaf8:6bbf]) by smtp.gmail.com with ESMTPSA id d10-20020a621d0a000000b005289f594326sm9014982pfd.69.2022.07.13.09.44.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jul 2022 09:44:37 -0700 (PDT) Message-ID: Date: Wed, 13 Jul 2022 22:14:33 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 To: devel@edk2.groups.io Cc: michael.d.kinney@intel.com, mikuback@linux.microsoft.com, jabeena.b.gaibusab@intel.com, jiewen.yao@intel.com From: "Ayush Singh" Subject: [NetworkPkg] Clarification on EFI_TCP6_PROTOCOL Destruction Behavior Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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