1 ' **********************************************************************
3 ' Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
5 ' This copy of Ice is licensed to you under the terms described in the
6 ' ICE_LICENSE file included in this distribution.
8 ' **********************************************************************
14 Inherits Ice
.Application
16 Public Overloads Overrides
Function run(ByVal args() As String) As Integer
17 If args
.Length
> 0 Then
18 Console
.Error.WriteLine(appName() & ": too many arguments")
22 Dim server
As CallbackSenderPrx
= CallbackSenderPrxHelper
.checkedCast(communicator().propertyToProxy("Callback.Client.CallbackServer"))
23 If server Is
Nothing Then
24 System
.Console
.Error.WriteLine("invalid proxy")
28 Dim adapter
As Ice
.ObjectAdapter
= communicator().createObjectAdapter("")
29 Dim ident
As Ice
.Identity
= New Ice
.Identity
30 ident
.name
= System
.Guid
.NewGuid().ToString()
32 adapter
.add(New CallbackReceiverI
, ident
)
34 server
.ice_getConnection().setAdapter(adapter
)
35 server
.addClient(ident
)
36 communicator().waitForShutdown()
43 Public Sub Main(ByVal args() As String)
44 Dim app
As Client
= New Client
45 Dim status
As Integer = app
.main(args
, "config.client")
46 System
.Environment
.Exit(status
)