Package cli.System.Net.Sockets

Examples of cli.System.Net.Sockets.LingerOption


                    ((cli.System.Array)optval).SetValue(val, 0);
                }
            }
            else if (val instanceof LingerOption)
            {
                LingerOption lo = (LingerOption)val;
                linger ling = (linger)optval;
                ling.l_onoff = lo.get_Enabled() ? 1 : 0;
                // FXBUG the linger time is treated as a signed short instead of an unsiged short
                ling.l_linger = lo.get_LingerTime() & 0xFFFF;
            }
            else
            {
                lastError = WSAEINVAL;
                return SOCKET_ERROR;
View Full Code Here


        public int l_onoff;
        public int l_linger;

        LingerOption ToLingerOption()
        {
            return new LingerOption(l_onoff != 0, l_linger);
        }
View Full Code Here

            int level = mapSocketOptionLevel(opt);
            int name = mapSocketOptionName(opt);
            Object obj = fd.getSocket().GetSocketOption(SocketOptionLevel.wrap(level), SocketOptionName.wrap(name));
            if (obj instanceof LingerOption)
            {
                LingerOption lo = (LingerOption)obj;
                return lo.get_Enabled() ? lo.get_LingerTime() : -1;
            }
            return CIL.unbox_int(obj);
        }
        catch (cli.System.Net.Sockets.SocketException x)
        {
View Full Code Here

TOP

Related Classes of cli.System.Net.Sockets.LingerOption

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.