' 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

Class Server2

    Public Shared Sub Main(ByVal args As String())
        ChannelServices.RegisterChannel(New TcpServerChannel (50000))
        RemotingConfiguration.RegisterWellKnownServiceType(GetType(Calc), "Calc", WellKnownObjectMode.Singleton)
        Console.Write("Press enter to exit")
        Console.ReadLine
    End Sub
End Class
