package Ġca . c utter sl ade . experiment . gk Ċ Ċ import Ġio . grpc . Managed Channel Builder Ċ import Ġio . grpc . Server Builder Ċ import Ġkotlinx . coroutines . experimental . run Blocking ĊĊ Ċ fun Ġmain ( args : ĠArray < String >) Ġ{ ĊĠ Ġval Ġserver Ġ= ĠServer Builder ĊĠĠĠĠĠ Ġ. for Port ( 0 ) ĊĠĠĠĠĠ Ġ. add Service ( G reet er ()) ĊĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠ Ġ. also Ġ{ Ġit . start () Ġ} ĊĠ Ġval Ġchannel Ġ= ĠManaged Channel Builder ĊĠĠĠĠĠ Ġ. for Address (" localhost ", Ġserver . port ) ĊĠĠĠĠĠ Ġ. use Pl aintext () ĊĠĠĠĠĠ Ġ. build () ĊĊĠ Ġval Ġg reet er Ġ= ĠG reet er Grpc Kt . new Stub ( channel ) ĊĊĠ Ġrun Blocking Ġ{ ĊĠĠĠ Ġval Ġresponse Ġ= Ġg reet er . say Hello ( Hello Request . newBuilder (). setName (" coroutines "). build ()). await () ĊĠĠĠ Ġprintln ( response . message ) ĊĊĠĠĠ Ġval Ġresponse Again Ġ= Ġg reet er . say Hello Again ( Hello Request . newBuilder (). setName (" kotlin "). build ()). await () ĊĠĠĠ Ġprintln ( response Again . message ) ĊĠ Ġ} ĊĊĠ Ġserver . shutdown () Ċ } Ċ