Hello !

in my function :

```D
  private config_load_answer load_config(string[] args)
    in(args !is null, "args cannot be null")
    in(args.length == 2, "need 1 arguments")
    out(r; r.state == "SUCCESS", "load_config should succeed")
out(r; !r.config_name.empty, "config_name should not be empty") out(r; r.config_id > 0, "config_id should be different than 0")
    {
        string config_key;
        string readonly_config_key;
getopt(args, "key", &config_key, "readonly_key", &readonly_config_key); auto cfg = deserialize_to!config_load("../API_doc/json_recipes/config_load.json");
        cfg.config_key = config_key;
        cfg.readonly_config_key = readonly_config_key;
        writeln(cfg);
        writeln(cfg.serializeToJsonPretty);
        client_.socket.send(cfg.serializeToJson);
        auto answer = new ubyte[256]; //
        client_.socket.receive(answer);
        (cast(string) answer).writeln;
return (cast(string) answer).deserialize!config_load_answer;
    }
```

I would like to get rid of the "ubytes[256]" because I do not know the size of the data that is comming, I would like to read the entire buffer that I send at once. Can someone point me?

(i'm pretty new to D langage, but i'm familiar with C++, and for example in boost asio we have `byte_transfered` so we can create a buffer with this size and read the incoming data)

Thank's a lot for your help !

Reply via email to