Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ice_timeout #214

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/Ice/callback/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int
run(const shared_ptr<Ice::Communicator>& communicator)
{
auto sender = Ice::checkedCast<CallbackSenderPrx>(
communicator->propertyToProxy("CallbackSender.Proxy")->ice_twoway()->ice_timeout(-1)->ice_secure(false));
communicator->propertyToProxy("CallbackSender.Proxy")->ice_twoway()->ice_secure(false));
if (!sender)
{
cerr << "invalid proxy" << endl;
Expand Down
4 changes: 2 additions & 2 deletions cpp/IceBox/hello/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ void menu();
int
run(const shared_ptr<Ice::Communicator>& communicator)
{
auto twoway = Ice::checkedCast<HelloPrx>(
communicator->propertyToProxy("Hello.Proxy")->ice_twoway()->ice_timeout(-1)->ice_secure(false));
auto twoway =
Ice::checkedCast<HelloPrx>(communicator->propertyToProxy("Hello.Proxy")->ice_twoway()->ice_secure(false));
if (!twoway)
{
cerr << "invalid proxy" << endl;
Expand Down
24 changes: 12 additions & 12 deletions csharp/Ice/callback/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public static int Main(string[] args)
// The new communicator is automatically destroyed (disposed) at the end of the
// using statement
//
using(var communicator = Ice.Util.initialize(ref args, "config.client"))
using (var communicator = Ice.Util.initialize(ref args, "config.client"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should switch to using statements.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that's unrelated to this PR however.

{
//
// The communicator initialization removes all Ice-related arguments from args
//
if(args.Length > 0)
if (args.Length > 0)
{
Console.Error.WriteLine("too many arguments");
status = 1;
Expand All @@ -33,7 +33,7 @@ public static int Main(string[] args)
}
}
}
catch(Exception ex)
catch (Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
Expand All @@ -45,8 +45,8 @@ public static int Main(string[] args)
private static int run(Ice.Communicator communicator)
{
var sender = CallbackSenderPrxHelper.checkedCast(communicator.propertyToProxy("CallbackSender.Proxy").
ice_twoway().ice_timeout(-1).ice_secure(false));
if(sender == null)
ice_twoway().ice_secure(false));
if (sender == null)
{
Console.Error.WriteLine("invalid proxy");
return 1;
Expand All @@ -69,23 +69,23 @@ private static int run(Ice.Communicator communicator)
Console.Out.Write("==> ");
Console.Out.Flush();
line = Console.In.ReadLine();
if(line == null)
if (line == null)
{
break;
}
if(line.Equals("t"))
if (line.Equals("t"))
{
sender.initiateCallback(receiver);
}
else if(line.Equals("s"))
else if (line.Equals("s"))
{
sender.shutdown();
}
else if(line.Equals("x"))
else if (line.Equals("x"))
{
// Nothing to do
}
else if(line.Equals("?"))
else if (line.Equals("?"))
{
menu();
}
Expand All @@ -95,12 +95,12 @@ private static int run(Ice.Communicator communicator)
menu();
}
}
catch(Exception ex)
catch (Exception ex)
{
Console.Error.WriteLine(ex);
}
}
while(!line.Equals("x"));
while (!line.Equals("x"));

return 0;
}
Expand Down
40 changes: 20 additions & 20 deletions csharp/IceBox/hello/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public static int Main(string[] args)
// The new communicator is automatically destroyed (disposed) at the end of the
// using statement
//
using(var communicator = Ice.Util.initialize(ref args, "config.client"))
using (var communicator = Ice.Util.initialize(ref args, "config.client"))
{
//
// The communicator initialization removes all Ice-related arguments from args
//
if(args.Length > 0)
if (args.Length > 0)
{
Console.Error.WriteLine("too many arguments");
status = 1;
Expand All @@ -33,7 +33,7 @@ public static int Main(string[] args)
}
}
}
catch(Exception ex)
catch (Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
Expand All @@ -45,8 +45,8 @@ public static int Main(string[] args)
private static int run(Ice.Communicator communicator)
{
var twoway = HelloPrxHelper.checkedCast(
communicator.propertyToProxy("Hello.Proxy").ice_twoway().ice_timeout(-1).ice_secure(false));
if(twoway == null)
communicator.propertyToProxy("Hello.Proxy").ice_twoway().ice_secure(false));
if (twoway == null)
{
Console.Error.WriteLine("invalid proxy");
return 1;
Expand All @@ -68,25 +68,25 @@ private static int run(Ice.Communicator communicator)
Console.Out.Write("==> ");
Console.Out.Flush();
line = Console.In.ReadLine();
if(line == null)
if (line == null)
{
break;
}
if(line.Equals("t"))
if (line.Equals("t"))
{
twoway.sayHello();
}
else if(line.Equals("o"))
else if (line.Equals("o"))
{
oneway.sayHello();
}
else if(line.Equals("O"))
else if (line.Equals("O"))
{
batchOneway.sayHello();
}
else if(line.Equals("d"))
else if (line.Equals("d"))
{
if(secure)
if (secure)
{
Console.WriteLine("secure datagrams are not supported");
}
Expand All @@ -95,9 +95,9 @@ private static int run(Ice.Communicator communicator)
datagram.sayHello();
}
}
else if(line.Equals("D"))
else if (line.Equals("D"))
{
if(secure)
if (secure)
{
Console.WriteLine("secure datagrams are not supported");
}
Expand All @@ -106,15 +106,15 @@ private static int run(Ice.Communicator communicator)
batchDatagram.sayHello();
}
}
else if(line.Equals("f"))
else if (line.Equals("f"))
{
batchOneway.ice_flushBatchRequests();
if(!secure)
if (!secure)
{
batchDatagram.ice_flushBatchRequests();
}
}
else if(line.Equals("S"))
else if (line.Equals("S"))
{
secure = !secure;

Expand All @@ -124,7 +124,7 @@ private static int run(Ice.Communicator communicator)
datagram = HelloPrxHelper.uncheckedCast(datagram.ice_secure(secure));
batchDatagram = HelloPrxHelper.uncheckedCast(batchDatagram.ice_secure(secure));

if(secure)
if (secure)
{
Console.WriteLine("secure mode is now on");
}
Expand All @@ -133,11 +133,11 @@ private static int run(Ice.Communicator communicator)
Console.WriteLine("secure mode is now off");
}
}
else if(line.Equals("x"))
else if (line.Equals("x"))
{
// Nothing to do
}
else if(line.Equals("?"))
else if (line.Equals("?"))
{
menu();
}
Expand All @@ -147,7 +147,7 @@ private static int run(Ice.Communicator communicator)
menu();
}
}
catch(Exception ex)
catch (Exception ex)
{
Console.Error.WriteLine(ex);
}
Expand Down
2 changes: 1 addition & 1 deletion java/Ice/callback/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static void main(String[] args)
private static int run(com.zeroc.Ice.Communicator communicator)
{
CallbackSenderPrx sender = CallbackSenderPrx.checkedCast(
communicator.propertyToProxy("CallbackSender.Proxy")).ice_twoway().ice_timeout(-1).ice_secure(false);
communicator.propertyToProxy("CallbackSender.Proxy")).ice_twoway().ice_secure(false);
if(sender == null)
{
System.err.println("invalid proxy");
Expand Down
2 changes: 1 addition & 1 deletion java/IceBox/hello/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static int run(com.zeroc.Ice.Communicator communicator)
{

HelloPrx twoway = HelloPrx.checkedCast(
communicator.propertyToProxy("Hello.Proxy")).ice_twoway().ice_timeout(-1).ice_secure(false);
communicator.propertyToProxy("Hello.Proxy")).ice_twoway().ice_secure(false);
if(twoway == null)
{
System.err.println("invalid object reference");
Expand Down
4 changes: 0 additions & 4 deletions php/IceDiscovery/hello/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
{
$p = $p->ice_secure(true);
}
if(isset($_POST["timeout"]) and $_POST["timeout"] == "yes")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this demo wants to demonstrate invocation timeouts.

{
$p = $p->ice_timeout(2000);
}
if(isset($_POST["delay"]) and $_POST["delay"] == "yes")
{
$delay = 2500;
Expand Down
2 changes: 1 addition & 1 deletion python/Ice/callback/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def callback(self, current):
def run(communicator):
sender = Demo.CallbackSenderPrx.checkedCast(
communicator.propertyToProxy('CallbackSender.Proxy').
ice_twoway().ice_timeout(-1).ice_secure(False))
ice_twoway().ice_secure(False))
if not sender:
print("invalid proxy")
sys.exit(1)
Expand Down