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
J

Jack045

@Jack045
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Some issues with Socket class behavior.
    J Jack045

    Hello XeoN-Kc, thanks for reply. However my problem is not about receiving sent data. And the server application even configured to not receive anything. (on purpose, and its Receive buffer set to 0 ). The point is that independently from how server is functioning, after successful Connect, client's first Socket.Send can "send" data array of any size and return immediately. And second problem is that Socket.Close(n), never waits n seconds, even if there is a lot of data still to be send.

    C# help question

  • Some issues with Socket class behavior.
    J Jack045

    Hello. Please help me find out if its normal behavior of Socket class. issue#1 - After connecting, first call to Socket.Send always returns immediately. I know that Send puts data in buffer first, but not megabytes, right ? Code: Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); s.Connect("61.213.43.1", 30); //Sending returns immediately. //bData can be huge (tested with ~10 mb ) //and bytesSent will always contain bData.Length int bytesSent = s.Send(bData, bData.Length, SocketFlags.None); s.Shutdown(SocketShutdown.Both); s.Close(); This code executes immediately. Including Shutdown & Close. This leads to issue #2: - Socket.Close never blocks (even if MSDN says is should) Code same as above but: s.Close(9999); or s.LingerState = new LingerOption(true, 9999); s.Close(9999); Please confirm such behavior, or suggest what might be wrong and how it works for you. Its very important to me, thank you in advance.

    C# help question
  • Login

  • Don't have an account? Register

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