mirror of https://github.com/grpc/grpc-java.git
examples: adjust comment (#6314)
This commit is contained in:
parent
2eb3f8c34e
commit
d1411b205c
|
|
@ -78,12 +78,13 @@ public final class HelloJsonClient {
|
|||
* greeting.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
// Access a service running on the local machine on port 50051
|
||||
HelloJsonClient client = new HelloJsonClient("localhost", 50051);
|
||||
try {
|
||||
/* Access a service running on the local machine on port 50051 */
|
||||
String user = "world";
|
||||
// Use the arg as the name to greet if provided
|
||||
if (args.length > 0) {
|
||||
user = args[0]; /* Use the arg as the name to greet if provided */
|
||||
user = args[0];
|
||||
}
|
||||
client.greet(user);
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -73,12 +73,13 @@ public class CompressingHelloWorldClient {
|
|||
* greeting.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
// Access a service running on the local machine on port 50051
|
||||
CompressingHelloWorldClient client = new CompressingHelloWorldClient("localhost", 50051);
|
||||
try {
|
||||
/* Access a service running on the local machine on port 50051 */
|
||||
String user = "world";
|
||||
// Use the arg as the name to greet if provided
|
||||
if (args.length > 0) {
|
||||
user = args[0]; /* Use the arg as the name to greet if provided */
|
||||
user = args[0];
|
||||
}
|
||||
client.greet(user);
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -75,12 +75,13 @@ public class CustomHeaderClient {
|
|||
* Main start the client from the command line.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
// Access a service running on the local machine on port 50051
|
||||
CustomHeaderClient client = new CustomHeaderClient("localhost", 50051);
|
||||
try {
|
||||
/* Access a service running on the local machine on port 50051 */
|
||||
String user = "world";
|
||||
// Use the arg as the name to greet if provided
|
||||
if (args.length > 0) {
|
||||
user = args[0]; /* Use the arg as the name to greet if provided */
|
||||
user = args[0];
|
||||
}
|
||||
client.greet(user);
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -70,12 +70,13 @@ public class HelloWorldClient {
|
|||
* greeting.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
// Access a service running on the local machine on port 50051
|
||||
HelloWorldClient client = new HelloWorldClient("localhost", 50051);
|
||||
try {
|
||||
/* Access a service running on the local machine on port 50051 */
|
||||
String user = "world";
|
||||
// Use the arg as the name to greet if provided
|
||||
if (args.length > 0) {
|
||||
user = args[0]; /* Use the arg as the name to greet if provided */
|
||||
user = args[0];
|
||||
}
|
||||
client.greet(user);
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Reference in New Issue