[Mono-list] 18-Nov-2001 build broken + TcpListener.AcceptTcpClient() problem + Bug report

Miguel de Icaza miguel@ximian.com
20 Nov 2001 01:18:16 -0500


> Are the class libraries broken in the 18-Nov-2001 snapshot?  I get errors in
> corlib/System/MonoType.cs and corlib/System.Text/Encoding.cs

My fault.  Dietmar commited a fix shortly afterwards, it should be fixed
in the next snapshot.

> MonoType.cs gives heaps of errors; I've just rm'd it to get my build going
> here.  However, Encoding.cs seems to just have two typos, which can be fixed
> with the following:

Maybe the problem is that you are compiling a different target? 
Currently we only support the compilation of the target for running on
Linux.

> I've written everything except for one method -
> TcpListener.AcceptTcpClient(), which is meant to accept an incoming
> connection (à la accept() from BSD sockets) and return it, encapsulated in a
> TcpClient object.  However, I can't figure out how to set the
> TcpClient.Client property properly -- it's protected, but even if I declare
> TcpListener derived from TcpClient, I can't get at it.

You might want to have an `internal' method (this is a method that can
only be called from within the assembly) to "configure" the TcpClient:

internal SetTcpClient (Socket s)
{
	MySocket = s;
}

> My test cases compile with the class libraries from Beta 2, but not in the
> mcs/class tree yet due to a couple of dependencies.  First, one in
> System.Net/IPAddress.cs (I think the filename is missing a 'd' -
> 'IPAdress.cs'):

Thanks for pointing this out.


>     public static readonly IPAddress Any;
>     public static readonly IPAddress Broadcast;
>     public static readonly IPAddress Loopback;
>     public static readonly IPAddress None;
> 
> I'm not sure if you need to assign these to Inaddr{Any, Broadcase, Loopback,
> None} or not ...

Yes, they should.  I have commited a fix now.