From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:102]) by sourceware.org (Postfix) with ESMTPS id 8B1A6385E008 for ; Wed, 25 Mar 2020 11:20:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8B1A6385E008 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=anrdaemon@yandex.ru Received: from mxback24g.mail.yandex.net (mxback24g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:324]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 2CFC51D42D7A; Wed, 25 Mar 2020 14:20:03 +0300 (MSK) Received: from sas1-e20a8b944cac.qloud-c.yandex.net (sas1-e20a8b944cac.qloud-c.yandex.net [2a02:6b8:c14:6696:0:640:e20a:8b94]) by mxback24g.mail.yandex.net (mxback/Yandex) with ESMTP id wTBAulRo9K-K2xq6tWh; Wed, 25 Mar 2020 14:20:03 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1585135203; bh=qV9DwkptwRM79IOwXlU0NThvyRLOFIC+QZVbGRt72QA=; h=In-Reply-To:Subject:To:Reply-To:From:Message-ID:References:Date; b=Jc084GuT03dWfb6VT6ky9IsWArE4gJHf5/y8lmklxkAmV0Uc68NvQpznceIUgELHD pY5j5b7PeBBed5G0vZAhZLV1UwZowxsI7HSWsEecw4TLSRBsSjODYCYroWUx9uyqac YtufDzT0wuA3D2bKgWs4Hwl7VeI3zREV94Do2tZY= Authentication-Results: mxback24g.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by sas1-e20a8b944cac.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id LPPZAmGtTZ-K1aO2Odr; Wed, 25 Mar 2020 14:20:01 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Wed, 25 Mar 2020 11:13:29 -0000 Date: Wed, 25 Mar 2020 14:13:28 +0300 From: Andrey Repin X-Mailer: The Bat! (v6.8.8) Home Reply-To: cygwin@cygwin.com X-Priority: 3 (Normal) Message-ID: <1701583233.20200325141328@yandex.ru> To: "PAULUS, Raimund, TI-ABN" , cygwin@cygwin.com Subject: Re: Problems using Qt5 and Apache Thrift In-Reply-To: <87e18da8dcf6464e81c38a7848e3a5c7@resw122.resdom01.local> References: <87e18da8dcf6464e81c38a7848e3a5c7@resw122.resdom01.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_2, KAM_ASCII_DIVIDERS, KAM_THEBAT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 11:20:09 -0000 Greetings, PAULUS, Raimund, TI-ABN! > Problems using Qt5 and Apache Thrift ...snip... > Now i want to implement the interface parts with Qt 5. Here is the new program sequence: > //------------------------------------------------------------------------------ > program starts > step 1: make the connection to the Linux server (Apache Thrift) > step 2: initialize Qt interface (create widgets, buttons, ...) > step 3: user interface (Qt) > step 4: data transfer PC <-> Linux-Host (Apache Thrift) > step 5: user interface (Qt) > step 6: data transfer PC <-> Linux-Host (Apache Thrift) > ... > ... > ... > step n-1: end Qt app > step n: close the connection to the host (Apache Thrift) > program ends > //------------------------------------------------------------------------------ > During step 2 the connection to the linux server is broken. You can see it > with the netstat command. First error message arises in step 4: > "TSocket::write_partial() send() Broken pipe" I strongly suggest placing communication service in its own thread. Then you could manage connection without having to worry about blocking timeouts caused by GUI operations. They will run asynchronously. > On a Linux box the client program runs perfectly. Only by coincidence, I suppose. > On the windows box the program works, if i initalize Qt before the > connection to the server is made (step 2 before step 1). But that is not > acceptable for me, because afterwards other widgets and buttons are created > and i can not close and create the connection at each point. I suppose, the server dropping connection by timeout. But I'd urge you to investigate this further. > For the tests I used the examples from the Apache Thrift Tutorial. Please include examples as text/plain attachments, if they are longer than a few lines. -- With best regards, Andrey Repin Wednesday, March 25, 2020 14:08:25 Sorry for my terrible english...