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

Author Topic: Sending Binary Files Across A Server  (Read 2454 times)

0 Members and 1 Guest are viewing this topic.

lordseanington

  • Jr. Member
  • **
  • Posts: 86
  • Coffee is the blood of a coder.
    • View Profile
Sending Binary Files Across A Server
« on: May 19, 2015, 02:44:51 am »
I am very confused on how to send a binary file across a network using SFML Udp Sockets. Can anyone clairify the topic or give me a hunk of code on how to send and receive. I am talking about files that can fit in the packet, not multi-packet files.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Sending Binary Files Across A Server
« Reply #1 on: May 19, 2015, 07:46:31 am »
UDP is an unreliable protocol. If you want all your packets to arrive and arrive in order, you should use TCP.

As for the problem, where are you stuck exactly? What is unclear in the tutorials or documentation?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

lordseanington

  • Jr. Member
  • **
  • Posts: 86
  • Coffee is the blood of a coder.
    • View Profile
Re: Sending Binary Files Across A Server
« Reply #2 on: May 19, 2015, 07:52:31 am »
Well the main issue I'm having is I'm not sure how I should send the data. Mainly I'm not sure weather to send it through SF::Packet or raw data. The other thing I'm afraid of is the difference in byte order.  I have tried multiple ways to send the binary data an none have worked