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. Windows Forms
  4. Could not receive Meesages from Socket

Could not receive Meesages from Socket

Scheduled Pinned Locked Moved Windows Forms
debugginghelp
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.
  • H Offline
    H Offline
    HemJoshi
    wrote on last edited by
    #1

    My Problem is when I debug my application I am getting broadcast messages from sever but not getting these broadcast when not in debugging mode. portion of the code iss do { byte[] myReadBuffer = new byte[tcpClient.ReceiveBufferSize]; int numberOfBytesRead = 0; try { if ( networkStream.CanRead) numberOfBytesRead = networkStream.Read(myReadBuffer, 0, myReadBuffer.Length); } catch (IOException) { networkStream = tcpClient.GetStream(); } if (numberOfBytesRead!=0) myCompleteMessage += System.Text.Encoding.ASCII.GetString(myReadBuffer,0,numberOfBytesRead); } while(networkStream.DataAvailable); if (myCompleteMessage.Length!=0) { DeliverMessage(myCompleteMessage,"","","",""); RegisterCompletion(); myCompleteMessage=""; } Close(); return true;

    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