SFML community forums

Help => Network => Topic started by: og_the_trog on November 19, 2015, 01:08:21 am

Title: [SOLVED] does pre-SFML-2.3 have problems with partial tcp sends?
Post by: og_the_trog on November 19, 2015, 01:08:21 am
Hello everybody.
I was reading the tutorials on this website for "communicating with sockets". I noticed the disclaimer down the bottom which read:
Quote
When using sf::TcpSocket in non-blocking mode, calls to send are not guaranteed to actually send all the data you pass to it, whether it be as a sf::Packet or as raw data. Starting from SFML 2.3, when sending raw data over a non-blocking sf::TcpSocket, always make sure to use the send(const void* data, std::size_t size, std::size_t& sent) overload which returns the number of bytes actually sent in the sent reference parameter after the function returns.

I was just wondering if this problem of partial sends (with unblocking tcp sockets) happens with all versions of SFML and has only been presented with a solution for SFML2.3, in which case I should update to SFML2.3. Or is this problem only in SFML2.3 so I'm fine to stick to my older version?

thankyou.
Title: Re: does pre-SFML-2.3 have problems with partial tcp sends?
Post by: eXpl0it3r on November 19, 2015, 01:20:26 am
It's a problem in all SFML 2.x versions (and earlier?), only SFML 2.3 offers a way to handle partial sends properly.
Personally I always advise updating, since newer versions will always contain bugfixes.
Title: Re: [SOLVED] does pre-SFML-2.3 have problems with partial tcp sends?
Post by: og_the_trog on November 19, 2015, 01:24:33 am
Thankyou