From: Andrey Repin <anrdaemon@yandex.ru>
To: "PAULUS, Raimund, TI-ABN" <Raimund.Paulus@dillinger.biz>,
cygwin@cygwin.com
Subject: Re: Problems using Qt5 and Apache Thrift
Date: Wed, 25 Mar 2020 14:13:28 +0300 [thread overview]
Message-ID: <1701583233.20200325141328@yandex.ru> (raw)
In-Reply-To: <87e18da8dcf6464e81c38a7848e3a5c7@resw122.resdom01.local>
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() <Host: my_host Port: 9090>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...
next prev parent reply other threads:[~2020-03-25 11:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 9:04 PAULUS, Raimund, TI-ABN
2020-03-25 11:13 ` Andrey Repin [this message]
2020-03-26 6:34 PAULUS, Raimund, TI-ABN
2020-03-26 6:59 PAULUS, Raimund, TI-ABN
2020-03-31 5:39 PAULUS, Raimund, TI-ABN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1701583233.20200325141328@yandex.ru \
--to=anrdaemon@yandex.ru \
--cc=Raimund.Paulus@dillinger.biz \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).