SetSocketOption fails for SocketOptionName ReceiveTimeout

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nathan Kerr

    #1

    SetSocketOption fails for SocketOptionName ReceiveTimeout

    I have been working with KB Article 812404 "HOW TO: Write
    Pluggable Protocol to Supprot FTP in Managed Classes by
    Using Visual Bassic.NET".

    I have modified the code to run on a Pocket PC. In the
    OpenControlConn ection routine the following lines are
    being executed:

    m_DataSocket.Se tSocketOption
    (SocketOptionLe vel.Socket, SocketOptionNam e.SendTimeout,
    m_ConnectTimeou t)
    m_DataSocket.Se tSocketOption
    (SocketOptionLe vel.Socket,
    SocketOptionNam e.ReceiveTimeou t, m_DataReceiveTi meout)

    The SendTimeout one works. The ReceiveTimeout fails with:
    ---------------------------------------------------------
    An unhandled exception of
    type 'System.Net.Soc kets.SocketExce ption' occurred in
    System.dll

    Additional information: An unknown, invalid, or
    unsupported option or level was specified in a getsockopt
    or setsockopt call
    ----------------------------------------------------------

    I assume this works with regular projects. The
    documentation says that ReceiveTimeout is supported by the
    compact framework.

    Am I running into a bug in the compact framework?
Working...