[Mono-bugs] [Bug 464201] New: Socket.BeginAccept overload doesn't work

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 7 12:52:05 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=464201


           Summary: Socket.BeginAccept overload doesn't work
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: amcgovern at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


using System;
using System.Net;
using System.Net.Sockets;
using System.Collections;
using System.Collections.Generic;
using System.Threading;

namespace TestCase
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            IPEndPoint ep = new IPEndPoint(IPAddress.Loopback, 10000);
            Socket accept = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
            Socket client = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
            Socket listener = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);

            listener.Bind(ep);
            listener.Listen(8);
            IAsyncResult listenResult = listener.BeginAccept(accept, 0, null,
null);

            client.Connect(ep);
            Console.WriteLine("1) Accept is connected? {0}", accept.Connected);

            listener.EndAccept(listenResult);
            Console.WriteLine("2) Accept is connected? {0}", accept.Connected);
            Console.WriteLine(connected == accept); // Should print 'true'.
        }
    }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list