public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "PAULUS, Raimund, TI-ABN" <Raimund.Paulus@dillinger.biz>
To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Subject: Re: Problems using Qt5 and Apache Thrift
Date: Thu, 26 Mar 2020 06:59:03 +0000	[thread overview]
Message-ID: <8fd3c9cc1ff04dd7bf5320a12d81a8e7@resw122.resdom01.local> (raw)

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 transfers data to the service and expects an answer. It is a synchronous communication 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 cannot continue. Every client has its own service.

Greetings

Ramund Paulus

> -----Ursprüngliche Nachricht-----
> Von: Andrey Repin [mailto:anrdaemon@yandex.ru]
> Gesendet: Mittwoch, 25. März 2020 12:13
> An: PAULUS, Raimund, TI-ABN; cygwin@cygwin.com
> Betreff: Re: Problems using Qt5 and Apache Thrift
> 
> 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...


             reply	other threads:[~2020-03-26  6:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  6:59 PAULUS, Raimund, TI-ABN [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-03-31  5:39 PAULUS, Raimund, TI-ABN
2020-03-26  6:34 PAULUS, Raimund, TI-ABN
2020-03-25  9:04 PAULUS, Raimund, TI-ABN
2020-03-25 11:13 ` Andrey Repin

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=8fd3c9cc1ff04dd7bf5320a12d81a8e7@resw122.resdom01.local \
    --to=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).