Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Newbie Socket Question

Newbie Socket Question

Scheduled Pinned Locked Moved C#
questioncsharpjavahelp
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joel Holdsworth
    wrote on last edited by
    #1

    Hi, I'm building an app that has to send large amounts of binary data - 700Mb and up to a remote copy of this app. The format of the data doesn't really matter as long as the method is fast, efficiant, and fairly easy to use outside .NET like in Java reimplementationas. I've looked at Socket.Send(Byte[], Int32, Int32, SocketFlags), but I'm not sure that putting a 700Mb buffer into that function would be such a good idea!? Is it necessary to split the thing up? can .NET help me with this so I don't have to reinvent the wheel? Or is there a better way of sending/downloading data altogether? Any answers would be much appreciated.**

    *¨¨`) ¸¸.·´ ¸.·*¨¨`) (¸¸.·* ¸ .·* ¸¸.·* (¸¸.~~> Joel Holdsworth.

    **

    E 1 Reply Last reply
    0
    • J Joel Holdsworth

      Hi, I'm building an app that has to send large amounts of binary data - 700Mb and up to a remote copy of this app. The format of the data doesn't really matter as long as the method is fast, efficiant, and fairly easy to use outside .NET like in Java reimplementationas. I've looked at Socket.Send(Byte[], Int32, Int32, SocketFlags), but I'm not sure that putting a 700Mb buffer into that function would be such a good idea!? Is it necessary to split the thing up? can .NET help me with this so I don't have to reinvent the wheel? Or is there a better way of sending/downloading data altogether? Any answers would be much appreciated.**

      *¨¨`) ¸¸.·´ ¸.·*¨¨`) (¸¸.·* ¸ .·* ¸¸.·* (¸¸.~~> Joel Holdsworth.

      **

      E Offline
      E Offline
      Eric Gunnerson msft
      wrote on last edited by
      #2

      Joel, You will definitely want to break it into chunks, and, with that much data, you will probably want to put some error-recovery around it to restart the download if something bad happens. I suggest include some sort of identifier (ie filename) and the chunk number with each chunk. Chunking also allows the remote app to display some sort of progress bar as the data comes across, which tends to be pretty useful.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups