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. Compile error, help!

Compile error, help!

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 4 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    s = new Socket( AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp ); s.Bind(localEndPoint); s.SetSocketOption(SocketOptionLevel.Udp, SocketOptionName.ReceiveTimeout,1000); This code produces a runtime error: An unknown, invalid, or unsupported option or level was specified in a getsockop t or setsockopt call Any help anyone ? I just want to set a timeout on recive of a UDP packet.

    J 1 Reply Last reply
    0
    • L Lost User

      s = new Socket( AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp ); s.Bind(localEndPoint); s.SetSocketOption(SocketOptionLevel.Udp, SocketOptionName.ReceiveTimeout,1000); This code produces a runtime error: An unknown, invalid, or unsupported option or level was specified in a getsockop t or setsockopt call Any help anyone ? I just want to set a timeout on recive of a UDP packet.

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      I believe it is because UDP doesn't support Timeouts, or so this thread on the Advanced DOTNET list seems to suggest. Yes just when you thought I couldn't push the DOTNET mailing list anymore they make a new one! :laugh: Hope that thread gives you some ideas, James Sonork ID: 100.11138 - Hasaki "My words but a whisper -- your deafness a SHOUT. I may make you feel but I can't make you think." - Thick as a Brick, Jethro Tull 1972

      A P 2 Replies Last reply
      0
      • J James T Johnson

        I believe it is because UDP doesn't support Timeouts, or so this thread on the Advanced DOTNET list seems to suggest. Yes just when you thought I couldn't push the DOTNET mailing list anymore they make a new one! :laugh: Hope that thread gives you some ideas, James Sonork ID: 100.11138 - Hasaki "My words but a whisper -- your deafness a SHOUT. I may make you feel but I can't make you think." - Thick as a Brick, Jethro Tull 1972

        A Offline
        A Offline
        Anders Molin
        wrote on last edited by
        #3

        You are right, UDP is "connectionless", and because of that you can't set a timeout. When you send UDP packets, you just send them, but you never know if the reciever get the packets or not... - Anders Money talks, but all mine ever says is "Goodbye!"

        1 Reply Last reply
        0
        • J James T Johnson

          I believe it is because UDP doesn't support Timeouts, or so this thread on the Advanced DOTNET list seems to suggest. Yes just when you thought I couldn't push the DOTNET mailing list anymore they make a new one! :laugh: Hope that thread gives you some ideas, James Sonork ID: 100.11138 - Hasaki "My words but a whisper -- your deafness a SHOUT. I may make you feel but I can't make you think." - Thick as a Brick, Jethro Tull 1972

          P Offline
          P Offline
          Peter Stephens
          wrote on last edited by
          #4

          Thanks, James, for the link to those two DotNet mailing lists. I'm already signed up! :-D -- Peter Stephens

          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