Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] does pre-SFML-2.3 have problems with partial tcp sends?  (Read 2065 times)

0 Members and 1 Guest are viewing this topic.

og_the_trog

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
[SOLVED] does pre-SFML-2.3 have problems with partial tcp sends?
« 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.
« Last Edit: November 19, 2015, 01:24:24 am by og_the_trog »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
Re: does pre-SFML-2.3 have problems with partial tcp sends?
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

og_the_trog

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Re: [SOLVED] does pre-SFML-2.3 have problems with partial tcp sends?
« Reply #2 on: November 19, 2015, 01:24:33 am »
Thankyou