Message ID | 20240130075036.11168-2-michael.bella-oss@weidmueller.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBDS5X3ELQ4BRBV6U4KWQMGQE3Z3RP3I@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=j6Dfxl16; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::c39; helo=mail-oo1-xc39.google.com; envelope-from=swupdate+bncbds5x3elq4brbv6u4kwqmgqe3z3rp3i@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-oo1-xc39.google.com (mail-oo1-xc39.google.com [IPv6:2607:f8b0:4864:20::c39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TPHQy3mk6z23gc for <incoming@patchwork.ozlabs.org>; Tue, 30 Jan 2024 18:50:50 +1100 (AEDT) Received: by mail-oo1-xc39.google.com with SMTP id 006d021491bc7-598b4d37248sf3039457eaf.1 for <incoming@patchwork.ozlabs.org>; Mon, 29 Jan 2024 23:50:50 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1706601048; cv=pass; d=google.com; s=arc-20160816; b=HZfhOrcKZ04PCL+iZzohWKfdB31P0Mu99vhBl/F/JvHG6qm1VGIgZDqbDn/2gQPtjk C+9HPTP4q3emr2eL8izv47egs19CU4sFwVN5Z0aC86ObfRGNP+5nHjSGxfnzRLU++bgp MEgglhIwKhEFM83XIMYxOdmKC5Au1kQ1zE1R70rlb5cCS1t0JIjnVS2ZeQYuPeAI9DQK pCZUg8tgRsmEbEL25hpw5ziMm69iQ1HoLz7DKSuSIe5zoDx4eZD8aplyazgw0bvXYHwt ZAZeXEjLhR61+pBqb9ozhx78bEKaSZNluwS8Xxjqs8iq2aMQY9/8FeYi9XFIoSlYQWf6 dmUg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=VBiVYHZOvwRnJ58tMW2SO/AEWvXkBp51DARj/buCjHg=; fh=X//+z9XtxwqD0pEPg5d9YeasbLj8+7zgYONkpECQouw=; b=z0MiXX7g35WqKfgkH7U0fVyvO3YFzIkkAG2L8/byNtFJYC1F4y1qfL04QjCIzqfCY9 31J5h03K9ILL04xJVNZnZ/AfeMZbSxctrX8SvJ7pcx0PLUeIfp0um/rDiIMPgAW+bPQ5 HGKGJKnjFindsYLrih4d5SHNmlaCfX1+swwZVD4UhUrbic3S2S50p5Xpzr0ZcdzxVEBj 8E6wQdxYUa22V/vziw9yf2ZD1trqGFQ5Wseo/6lz4r1+NUH/WfeRM0pIahL4/qf6T3KG IVn9WNDxbMRONguFbvF98E2PCmylrywxo7zZ//JjqdOwYCfZm0xgBBo75UVjWckdCIze Xm5Q== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@weidmueller.onmicrosoft.com header.s=selector1-weidmueller-onmicrosoft-com header.b=21pS+m6C; arc=pass (i=1 spf=pass spfdomain=weidmueller.com dkim=pass dkdomain=weidmueller.com dmarc=pass fromdomain=weidmueller.com); spf=pass (google.com: domain of michael.bella-oss@weidmueller.com designates 2a01:111:f403:260e::600 as permitted sender) smtp.mailfrom=Michael.Bella-oss@weidmueller.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=weidmueller.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1706601048; x=1707205848; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=VBiVYHZOvwRnJ58tMW2SO/AEWvXkBp51DARj/buCjHg=; b=j6Dfxl16MeAQPyq8huXLj3at9N5hLa0wp8QLhoriynKtX2Fc10kvD++ffIhO0o9ton 76ZMYzGMrQAf1cTn1mNxzg+1G1dSeawgukIiJiWdY1c081bFl9XKlDKtdptHkRY4mihq r8loff7BYQihail6WRXefTWFsB1eORkztfzfLowG1ZT2MczrQgCiHWlebZdHglOAr6g1 t0JCQ2sRyM3En1kwPucJ8B+GcYCK7UBBj4H/fv/OTn1ITWn9Am4uw3v6rlRr8oML6MIQ c9Y7g5Uah6PopGIFxUFZmI5f/HXlooRqt8DEbr4H8PAt8SLIPqKc2R9hY3ohkRFlo5QQ wPzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706601048; x=1707205848; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=VBiVYHZOvwRnJ58tMW2SO/AEWvXkBp51DARj/buCjHg=; b=eNBahyR+CC0SdIOHvZY/zgEtCejrCgjBu4TtZKg1yvBPhTRHDVBlt1yXTL5/emxlit T5Q0Vw4TxOPXIY+uKTFG1r8IQFoxGGreezcIdVu3wBjheC2x5Ikt7jBfvXXutGr7mojs OZch91QjCZ6DkJDhr0vJLS6m3HmsKQ5CG0EJ2uEG1E0qnz9QwfJi1Y7gyBTFaDOyzKk6 Mlq6HFqpwhJNkwzjpkri6TQTu28NgSi03F9BLIO+yOa8L9pxHMw9HgFt2a4vpzyxPwGu jseqM49DXDjWlaL03RP67qWt7FPuvWYJ3LBUwsEwplKgtD1cB5eEkylpH5MsG2R+D4zY uFzw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOJu0Yxy8nNGqjLQL0jp8sT1LkaB5W8S0dGfMdcQ6CwjNrw6y+SUbIr4 ntrpFvP5b2lwFkNyZuGEbxdmiCfqnrp1V1ghIKuU3C7qEQhT9q6O X-Google-Smtp-Source: AGHT+IFqr8oc0vs8wmDDgMlbwSMJ6ZakfLbKu9yL6UAFV5TzWDE4AEX9p4gojsjSyiHD792jtGYcdg== X-Received: by 2002:a4a:e3cc:0:b0:599:bcaa:85c2 with SMTP id m12-20020a4ae3cc000000b00599bcaa85c2mr4558791oov.9.1706601047752; Mon, 29 Jan 2024 23:50:47 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a4a:e823:0:b0:598:9123:346d with SMTP id d3-20020a4ae823000000b005989123346dls1015758ood.0.-pod-prod-08-us; Mon, 29 Jan 2024 23:50:46 -0800 (PST) X-Received: by 2002:a9d:7a45:0:b0:6e1:10f1:345d with SMTP id z5-20020a9d7a45000000b006e110f1345dmr5000452otm.29.1706601046641; Mon, 29 Jan 2024 23:50:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706601046; cv=pass; d=google.com; s=arc-20160816; b=tKG9ZBrUNpEVo/3ObGrcUftuOrLC3QVxV+ODnmSxBpgbO5XbIIBalvhX3C21GaGBy2 vWozRbnaBmSDY1uS7vS5kjnf50LWiQ9TIZX154TwlEbDc0SAdDcUBzSEa4NDGj+Ycn1I 32/I6qfPZ6+s+RXjBROplI5pGp3DptH0QgPwtltVUZRxS+fNJ08q/o6dIpWZiGLIXo/v zKoSQ9/tbDheYq1PcpsRyQcVRmCKm9d8wnRDIKzcqvpvlIxyqCxWNRPBnpDc8MFR3wUh 6zSpWTjyCV93SQV9O6xjcadMakeUsoZcmetQJPOLfYx5+u9NNO/T1MTxeazrdUNIW3sY jsLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jKdcFAlgUe8zPXnNDK9poYwWEkEfiGDVRdiVDhiTBpY=; fh=X//+z9XtxwqD0pEPg5d9YeasbLj8+7zgYONkpECQouw=; b=y0/ENAUuQ4iGHHO6fIkiET74V5qZv2dsISuq2udY88dSznN04eVTpf4FaK2otDdPyC d5wuROYk759RkWi/6jxjFxrygI4OOkBcuz2Y1UzlkTTVkqJgfMUEQKm4jvOfawDJKbjm b2sRlKqiHbZSqYlM49he47ptStcjMH5fS32P6k40dYJE/jI4J/j7aS9Xqx61FFq6eSi3 9lKc9FRKc09gPwh294199Ys0Jj9L0AdWkXBlEVM+Zea8qmG96id0e9R2o8CmiAwMswFt R/EWdj99KZZMwHVYeWzp1BdOg4rmm8EeVui8dz8jWqegsTZk7e2equ+JoQXRLft8jY2/ fM4A== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@weidmueller.onmicrosoft.com header.s=selector1-weidmueller-onmicrosoft-com header.b=21pS+m6C; arc=pass (i=1 spf=pass spfdomain=weidmueller.com dkim=pass dkdomain=weidmueller.com dmarc=pass fromdomain=weidmueller.com); spf=pass (google.com: domain of michael.bella-oss@weidmueller.com designates 2a01:111:f403:260e::600 as permitted sender) smtp.mailfrom=Michael.Bella-oss@weidmueller.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=weidmueller.com Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on20600.outbound.protection.outlook.com. [2a01:111:f403:260e::600]) by gmr-mx.google.com with ESMTPS id 73-20020a63004c000000b005d8df7bba03si158155pga.1.2024.01.29.23.50.46 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jan 2024 23:50:46 -0800 (PST) Received-SPF: pass (google.com: domain of michael.bella-oss@weidmueller.com designates 2a01:111:f403:260e::600 as permitted sender) client-ip=2a01:111:f403:260e::600; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LX+/bRv9h16vnIp2HcOh/f7bCsq3JZBKdqQ06VA2SZsk6976WqQjkImchqsSS23PIvAicFab6PwSZ8pyUZ8tr+sioFitQOBuKW8FfosTug3M6OvfZRnrGSFK5o4q87yXDz+WqTUiQld6mHtAzBGweUqrZemL810Ocyt9Jc5W3mbnBns3T8R530eXHHktuOiBNKeK26G5XTFn6xj9j/6UgKsDZTxUmFLvVYcAH1hNY5IgM+R9tV/B6/NRKqo8f+iy6+qYSf3mJ//m4i4fhhhh4f2fxL0Z6YVQRCuSAyIV3JAEx8jp2z67aw3y3t5ekxOGG957216FnzK50KUxkIJpSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jKdcFAlgUe8zPXnNDK9poYwWEkEfiGDVRdiVDhiTBpY=; b=fgkCFqU59yGu4OxVfQDQXev/qGRB57eF6nfPjoYVppz1MGmdGZSDcnkWVcfLr5+GpjGGUgSai/cbbCIiHc3tjXJz6FLllq3KtjnLmFwsL8GarbmVNhenogpgKP8WkqUEwduGgqiytUfgg6Yqglel4NCPxPhircHbzpBgdJqDIE/bjPC+ot1hNIWYz719qp3r0NHmiQ/qtK5cGSeedkmL2f3AlDriEkqcoKqyDgh5Pzzso70jnISurVOJmOqE4Ofq+gwAcwXkbvFURpKRYHc1iNqVDsCeNNRSwnuxGNlXuZsgdLDhAmahc7qJBYmkgury7cUkn8cK3gowPsfGL9VFRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=weidmueller.com; dmarc=pass action=none header.from=weidmueller.com; dkim=pass header.d=weidmueller.com; arc=none Received: from AM7PR08MB5512.eurprd08.prod.outlook.com (2603:10a6:20b:de::19) by GV1PR08MB9940.eurprd08.prod.outlook.com (2603:10a6:150:3d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.32; Tue, 30 Jan 2024 07:50:42 +0000 Received: from AM7PR08MB5512.eurprd08.prod.outlook.com ([fe80::5616:1009:156:f641]) by AM7PR08MB5512.eurprd08.prod.outlook.com ([fe80::5616:1009:156:f641%4]) with mapi id 15.20.7228.029; Tue, 30 Jan 2024 07:50:42 +0000 From: michael.bella-oss@weidmueller.com To: swupdate@googlegroups.com Cc: Michael Bella <michael.bella@weidmueller.com> Subject: [swupdate] [PATCH 2/2] mongoose: add swupdate websocket heartbeat Date: Tue, 30 Jan 2024 08:50:36 +0100 Message-Id: <20240130075036.11168-2-michael.bella-oss@weidmueller.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240130075036.11168-1-michael.bella-oss@weidmueller.com> References: <20240130075036.11168-1-michael.bella-oss@weidmueller.com> Content-Type: text/plain; charset="UTF-8" X-ClientProxiedBy: FR3P281CA0209.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a5::8) To AM7PR08MB5512.eurprd08.prod.outlook.com (2603:10a6:20b:de::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR08MB5512:EE_|GV1PR08MB9940:EE_ X-MS-Office365-Filtering-Correlation-Id: ea36995c-d000-470c-92ff-08dc2168288e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vvto8tN5Ns/HizSwG2xJzd7WCATQhsGcyzqUbfw57tnk2KUe7u7RxWlArv+wWgtosy+wxlvE8wBCXmmbOCUuKEriQ439pukW/xZxtDp9UsJVJ4vm23asufgMp0/LYHlL5ick9ELD208jvBuJoKDj8ZsDas3ObWtrXoVC80aVpMtTL1e4KItC8x3jA0iiQ+s3dcZpv8PQPE48CTowQNypH2Tr/ZD6LuewkiA3QKQnUfSAwOJW7ML6F9IBxhkAX7Nb41t+FFxxpsqhmMRLa9UDJbuA5U6k5VDtWA5mxrBhlDCRnjsBsgu4CAWlfWE2IsFgqwFt+TmWNgg6DusFzq8lokAfKsL5dw9Y/QGToTaGICn91nqS0NUvIv1mYNX4UAOwlf6MzHaxagfQXyq3bZs4MlzCaGVxAvN5nkI2msB+Ji+o8C3Zx4caMssGjdk2AeU8l6kPRmDI2yUEml5bk8JKxd9q5SlwERtDulryPRW5jmv/t5X4hb4zx5W74plHP+AJId+JhXVNoV4h12zX7KOovZt1uJ5plqcfwWrF/LrkTMG9mBH6LzHgtOjlfWOXC1DUqDiQKSjER36whpIAaG8S8F4YL4aK+STl/XKhOqyNUTwQyJRu+BlgNVmKOGsqF3vF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR08MB5512.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(396003)(346002)(39860400002)(136003)(366004)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(38350700005)(1076003)(4326008)(6512007)(5660300002)(52116002)(6506007)(6666004)(9686003)(2906002)(107886003)(26005)(8936002)(66556008)(316002)(8676002)(66946007)(2616005)(66476007)(6916009)(41300700001)(38100700002)(83380400001)(6486002)(478600001)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rgq96zbP+8aMATss8DCGPKE3G2dX56zPE66Ow4IUNDcA/CR5z/XdjDNkowUAVKFqNoOEHPyb/vzn3ZYx0fhUGWdcJhd1dnQZTEEd7Ed5mIVWqcVGEhtQp22c758OZc4nl0ZSInP+6RpPCPYg98cSAD+nxgjJUWJxoVzUy5OB6U2sXbp9tunp3hi+9b2UU1cnww1goMGjqgrrXcu0u3V42Mfg+U0ZcvwP6u1x8RclxIey9IzywjquyT3aL3ZttTZJOzxKeYgk5irHurzVDoD51RTOgPI0hi6sJDDT+VIFNruYBzkglqJx6ZV/AYto5cCVEpmAnILema2TIDM9MtBOXdSYW6PoIN3iazPmh7ed8Sr/BuRoUV8IwCcQattoS1d88OxkeQRghNBXdhNBI0DoojmekhCadn+MqahYPrRaK3krN1YE3CTsge1+AgdW7MFWIIlSJ59RfoeuEqZbQ8PPgy1WT6gTVbYIKGlKOeCHpqjrryP1A9oK4jFKiMZOmCahaipk8ywhTRcn+T5Dh8E6g9JIVOPt3yNI212j0Cvubu6f+lgmFOiirgv3ecTDc9zCjswZwjosWrmdaVb4+jeR7yrIRlkVuPqv44m6zbMr7uXuS/eRiYt/dfB8Cj0E6Wn5CcyCRWx3FZbhPMwsqsQCn7CrrtXCK24chydz47KKB5vOVS9+FC1vsALQu5phXdPxeEJRMAjA3J6vKDaTNdKpQeox8Utw1ZspMw8YHdiMwrjFXg3DcxFBoo0LrE8seATygqsMVut5XsYigkPvSU8UOjl1rwaWlvHAfP2dv2ZSm64B0dWSxyK9uPf/t2ItNJzbibmpEYpoWr+UmSWoz+higdYeiqQTXxFae4ApMQkW0XGo5GDJHJ/xGhR7Azm0FrtyAtlIs4QvybtKF5ELuDp0Su2Pdgp4VPsQrW6AkdsN+BXn4eBcq5+32xsTX0cyNeoLgOXcUgNUcjmrFxJBrVuuowzkUoTDrqr6cHb1yN/v3G11UHhrqSojN5juvGQbylFkETeP4mwa4GttzP4lZq0BNIYBcALzZ+O3RjytM8fDVucIvpV1S+wMoEPppgaV+r5LPFZgqFAh+QBajlWmPjaOroGPNw9T+DINJ55Had42SrjjnSVhIoCgTRS2RjgRUl25SLaaMK0MU+Wfwv0fDj9uKtcNHYRPk+Fkzh6s1eKlApW6KySa/ws2NExKcCc/uug5Kvzr029ZjkAe2911jnP82wG5Cahae3mSXc5P6pUz++t0l8xdy8RQiFBlZlkHanC3Z4Sr0EV0OHI31MaSC//hL/NfQzYpMnMVIkRvU/0zSgchk7iygclXJ3Y7IYEz3pvebUOubfIneqxzW5a1uRFHQ/2hyT3SdYepU8G4yvqSR5S6gRRLI3Phq/AnwXKaRBccoYZKXs/nrXauNFmUv9M2WvPxiFRlgP1+FuL/VAHUr98zxBJ1lmYFbqq8VH0qg1iVvbZ/IOgv0hGe2ka/388TxROhwMm8RD+aPJoD7cLlvDIL1XYzxVG7D0au2/ZsUSiL3t0t0RSf5lE8QutbfB9OsEjklhnCp93iiJsdF2punnEh0fmv94licYQZcNfqfES5Pd9Rl/MFNBuNLw/kBXYNnBrOdtj2o0yZAOlycYEOAUU= X-OriginatorOrg: weidmueller.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea36995c-d000-470c-92ff-08dc2168288e X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5512.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2024 07:50:42.1325 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e4289438-1c5f-4c95-a51a-ee553b8b18ec X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WEhaJJ9oXJmPlvM7egEkNDJkS8QmUT2hA4UxOQD85nIHcdyRXugpupHR0nAACezu/DK5/T8oS5T6Kf2KoNknwxni9ZtOZlT40Gq+AJLXkWmcCqWi7RFDLyl9yhez5KV5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB9940 X-Original-Sender: michael.bella-oss@weidmueller.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@weidmueller.onmicrosoft.com header.s=selector1-weidmueller-onmicrosoft-com header.b=21pS+m6C; arc=pass (i=1 spf=pass spfdomain=weidmueller.com dkim=pass dkdomain=weidmueller.com dmarc=pass fromdomain=weidmueller.com); spf=pass (google.com: domain of michael.bella-oss@weidmueller.com designates 2a01:111:f403:260e::600 as permitted sender) smtp.mailfrom=Michael.Bella-oss@weidmueller.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=weidmueller.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
[1/2] mongoose: use websocket flag of connection struct
|
expand
|
diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c index 09d564e..d343a5e 100644 --- a/mongoose/mongoose_interface.c +++ b/mongoose/mongoose_interface.c @@ -360,6 +360,7 @@ static void restart_handler(struct mg_connection *nc, void *ev_data) static void broadcast_callback(struct mg_connection *nc, int ev, void __attribute__ ((__unused__)) *ev_data, void __attribute__ ((__unused__)) *fn_data) { + static uint64_t last_io_time = 0; if (ev == MG_EV_READ) { struct mg_connection *t; for (t = nc->mgr->conns; t != NULL; t = t->next) { @@ -367,6 +368,16 @@ static void broadcast_callback(struct mg_connection *nc, int ev, mg_ws_send(t,(char *)nc->recv.buf, nc->recv.len, WEBSOCKET_OP_TEXT); } mg_iobuf_del(&nc->recv, 0, nc->recv.len); + last_io_time = mg_millis(); + } else if (ev == MG_EV_POLL) { + struct mg_connection *t; + uint64_t now = *((uint64_t *)ev_data); + if (now < last_io_time + 20000) return; + for (t = nc->mgr->conns; t != NULL; t = t->next) { + if (!t->is_websocket) continue; + mg_ws_send(t, "", 0, WEBSOCKET_OP_PING); + } + last_io_time = now; } }