From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailrelay.dillinger.de (mailrelayb.dillinger.de [212.184.64.29]) by sourceware.org (Postfix) with ESMTPS id BF2B0385E006 for ; Thu, 26 Mar 2020 06:59:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BF2B0385E006 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dillinger.biz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Raimund.Paulus@dillinger.biz Received: from mailrelaya2.dillinger.de (mailrelaya [192.168.175.11]) by lin254mailrelayb.dillinger.de (Postfix) with ESMTP id D7391A373 for ; Thu, 26 Mar 2020 07:59:03 +0100 (CET) Received: from lin275.int.shsservices.de (lin275 [172.18.32.6]) by mailrelaya2.dillinger.de (Postfix) with ESMTP id CF07E2422FB for ; Thu, 26 Mar 2020 08:04:05 +0100 (CET) Received: from resw122.resdom01.local (resw122.dillinger.de [172.18.22.122]) by lin275.int.shsservices.de (Postfix) with ESMTP id C045BF3BA0 for ; Thu, 26 Mar 2020 07:59:03 +0100 (CET) Received: from resw122.resdom01.local (172.18.22.122) by resw122.resdom01.local (172.18.22.122) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 26 Mar 2020 07:59:03 +0100 Received: from resw122.resdom01.local ([fe80::4dd9:f975:1c16:f521]) by resw122.resdom01.local ([fe80::4dd9:f975:1c16:f521%14]) with mapi id 15.00.1473.003; Thu, 26 Mar 2020 07:59:03 +0100 From: "PAULUS, Raimund, TI-ABN" To: "'cygwin@cygwin.com'" Subject: Re: Problems using Qt5 and Apache Thrift Thread-Topic: Problems using Qt5 and Apache Thrift Thread-Index: AdYDPAjvHAj/IWfmQAOHzmF2rqTc/w== Date: Thu, 26 Mar 2020 06:59:03 +0000 Message-ID: <8fd3c9cc1ff04dd7bf5320a12d81a8e7@resw122.resdom01.local> Accept-Language: en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.18.22.70] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.3 at mailrelay.dillinger.de X-Virus-Status: Clean X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, GIT_PATCH_2, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, 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: Thu, 26 Mar 2020 06:59:06 -0000 Hello Andrey Repin The sources and the documentation are her: https://thrift.apache.org/tutorial/cpp You must have libthrift installed. Maybe using threads is a better programming style, but i don't know, if it = solves the problem. I use connecting and disconnecting to the service like = braces around the rest of the application. At some points the application t= ransfers data to the service and expects an answer. It is a synchronous com= munication and i use it like RPC (remote procedure call). The client sends = a request and the service has to respond. Without the response the client c= annot continue. Every client has its own service. Greetings Ramund Paulus > -----Urspr=FCngliche Nachricht----- > Von: Andrey Repin [mailto:anrdaemon@yandex.ru] > Gesendet: Mittwoch, 25. M=E4rz 2020 12:13 > An: PAULUS, Raimund, TI-ABN; cygwin@cygwin.com > Betreff: Re: Problems using Qt5 and Apache Thrift >=20 > Greetings, PAULUS, Raimund, TI-ABN! >=20 > > Problems using Qt5 and Apache Thrift >=20 > ...snip... >=20 > > Now i want to implement the interface parts with Qt 5. Here is the new = program > sequence: >=20 > > //---------------------------------------------------------------------= --------- > > 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 > > //---------------------------------------------------------------------= --------- >=20 > > 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: >=20 > > "TSocket::write_partial() send() Broken pipe" >=20 > 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. >=20 > > On a Linux box the client program runs perfectly. >=20 > Only by coincidence, I suppose. >=20 > > 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 no= t > > acceptable for me, because afterwards other widgets and buttons are cre= ated > > and i can not close and create the connection at each point. >=20 > I suppose, the server dropping connection by timeout. But I'd urge you to > investigate this further. >=20 > > For the tests I used the examples from the Apache Thrift Tutorial. >=20 > Please include examples as text/plain attachments, if they are longer tha= n a > few lines. >=20 >=20 > -- > With best regards, > Andrey Repin > Wednesday, March 25, 2020 14:08:25 >=20 > Sorry for my terrible english...