Procházet zdrojové kódy

map: fixed typo in connect addr

lunar-mining před 4 roky
rodič
revize
0735cb65f0
2 změnil soubory, kde provedl 3 přidání a 4 odebrání
  1. 0 1
      bin/ircd/src/program_options.rs
  2. 3 3
      bin/map/src/main.rs

+ 0 - 1
bin/ircd/src/program_options.rs

@@ -73,7 +73,6 @@ impl ProgramOptions {
             ([127, 0, 0, 1], 6667).into()
             ([127, 0, 0, 1], 6667).into()
         };
         };
 
 
-
         let rpc_listen_addr = if let Some(rpc_addr) = app.value_of("RPC_LISTEN") {
         let rpc_listen_addr = if let Some(rpc_addr) = app.value_of("RPC_LISTEN") {
             rpc_addr.parse()?
             rpc_addr.parse()?
         } else {
         } else {

+ 3 - 3
bin/map/src/main.rs

@@ -51,8 +51,8 @@ impl Map {
         }
         }
     }
     }
 
 
-    // --> {"jsonrpc": "2.0", "method": "say_hello", "params": [], "id": 42}
-    // <-- {"jsonrpc": "2.0", "result": "hello world", "id": 42}
+     //--> {"jsonrpc": "2.0", "method": "say_hello", "params": [], "id": 42}
+     //<-- {"jsonrpc": "2.0", "result": "hello world", "id": 42}
     async fn say_hello(&self) -> Result<Value> {
     async fn say_hello(&self) -> Result<Value> {
         let req = jsonrpc::request(json!("say_hello"), json!([]));
         let req = jsonrpc::request(json!("say_hello"), json!([]));
         Ok(self.request(req).await?)
         Ok(self.request(req).await?)
@@ -60,7 +60,7 @@ impl Map {
 }
 }
 
 
 async fn start() -> Result<()> {
 async fn start() -> Result<()> {
-    let client = Map::new("127.0.0.1:8000".to_string());
+    let client = Map::new("tcp://127.0.0.1:8000".to_string());
     let reply = client.say_hello().await?;
     let reply = client.say_hello().await?;
     println!("Server replied: {}", &reply.to_string());
     println!("Server replied: {}", &reply.to_string());
     Ok(())
     Ok(())