' Collection of code snippets by Arne Vajhøj 
' (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
Imports System
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Tcp

Imports X.Common

Namespace X.Client
    ' test client klasse
    Class XClient
        Public Shared Sub Main(ByVal args As String())
            ' test
            ChannelServices.RegisterChannel(New TcpClientChannel )
            Dim a As IX = CType(Activator.GetObject(GetType(IX), "tcp://localhost:50000/A"), IX)
            Console.WriteLine(a.WhoAmI)
            Dim b As IX = CType(Activator.GetObject(GetType(IX), "tcp://localhost:50000/B"), IX)
            Console.WriteLine(b.WhoAmI)
        End Sub
    End Class 
End Namespace
