Boost Users :
Subject: Re: [Boost-users] [asio] sending and receiving binary
From: Wilde, Donald S (donald.s.wilde_at_[hidden])
Date: 2011-07-10 09:35:39
> > Ah, the other version did, but this one doesn't. I misunderstood and thought HandleWrite
> > was only bound to the error occurrence. I only want the connection to live through one send
> > and one reply, but if I understand you correctly I have to beg it to stay alive long enough
> > for the reply to go out?
> If you don't need it anymore, you don't have to...
> I don't see where your server code receives anything, but anyway, if
> all you need is to ensure that the data being sent with async_write
> won't be discarded due to socket closing, I believe you can just set
> linger option:
I hadn't gotten that far yet. I still need to add code to grab the message and interpret it, then build the real reply. I don't want this port to be tied up for long because it is meant to allow handheld devices to request connections which will be fulfilled by other sockets on other ports. Once this socket receives a request, I merely want to ack it and close the connection. The TV will then build permanent TCP and UDP connections with the device using the info from the initial request. The 'daytime' code is just a placeholder.
Thanks for the tips! I have no doubt it's all in there, I just need to learn to use it. :D
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net