X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com 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 AT yandex DOT ru 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 Date: Wed, 25 Mar 2020 14:13:28 +0300 From: Andrey Repin X-Mailer: The Bat! (v6.8.8) Home X-Priority: 3 (Normal) Message-ID: <1701583233.20200325141328@yandex.ru> To: "PAULUS, Raimund, TI-ABN" , cygwin AT cygwin DOT com Subject: Re: Problems using Qt5 and Apache Thrift In-Reply-To: <87e18da8dcf6464e81c38a7848e3a5c7@resw122.resdom01.local> References: <87e18da8dcf6464e81c38a7848e3a5c7 AT resw122 DOT resdom01 DOT local> MIME-Version: 1.0 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 AT cygwin DOT 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: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" 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... -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple