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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. An operation was attempted on something that is not a socket

An operation was attempted on something that is not a socket

Scheduled Pinned Locked Moved C#
helpquestion
2 Posts 2 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.
  • V Offline
    V Offline
    Vivek Vijayan
    wrote on last edited by
    #1

    i m doin device application the problem is wih socket my code was clientsocket = new TcpClient(ip,2000); clientsocket.ReceiveTimeout=10000; this code gives an exception "option is not supported or something like that" but this workd fine in windows application so i wrote clientsocket = new TcpClient(ip,2000); this line raises exception i m receiving exception "An operation was attempted on something that is not a socket" after sometime or after a sequence of clicks i think the problem is with socket timeout if so how can i increase the socket time out can any one help

    This code was posted by me...

    L 1 Reply Last reply
    0
    • V Vivek Vijayan

      i m doin device application the problem is wih socket my code was clientsocket = new TcpClient(ip,2000); clientsocket.ReceiveTimeout=10000; this code gives an exception "option is not supported or something like that" but this workd fine in windows application so i wrote clientsocket = new TcpClient(ip,2000); this line raises exception i m receiving exception "An operation was attempted on something that is not a socket" after sometime or after a sequence of clicks i think the problem is with socket timeout if so how can i increase the socket time out can any one help

      This code was posted by me...

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, I suggest you read the remarks in the MSDN document.[^] which is always a good thing to do (1) before using something and (2) when having problems. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a 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