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. Socket forcibly closed

Socket forcibly closed

Scheduled Pinned Locked Moved C#
questioncsharpsysadminhelp
1 Posts 1 Posters 0 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.
  • _ Offline
    _ Offline
    __DanC__
    wrote on last edited by
    #1

    I'm using a System.Net.Sockets.Socket in a server application to handle a large number of connections which receive a large amount of data. I have in incoming buffer of around 1/2MB to be read at a time using a NetworkStream wrapped around the socket. It is my understanding that a call to NetworkStream.Read will read what is available up to the buffer size and not necessarily wait until it has enough data to fill the buffer, is this correct? The reason I ask is because I am getting connections dropped from the server side and when I dump the TCP stream I see the TCP window size drop until it hits 0 at which point the connection is dropped. The only explanation I can think of for this is that the NetworkStream.Read is waiting too long for data and the buffer is filling up meaning no more data can be received. Does this sound correct or could there be something else causing this problem?

    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