mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-10 10:24:13 +00:00
fix reading buffer
This commit is contained in:
parent
a044fe82dd
commit
c708cc20d6
@ -71,22 +71,21 @@ impl Page {
|
|||||||
Priority::DEFAULT,
|
Priority::DEFAULT,
|
||||||
Some(&Cancellable::new()),
|
Some(&Cancellable::new()),
|
||||||
move |result| match result {
|
move |result| match result {
|
||||||
Ok(request) => {
|
Ok(_) => {
|
||||||
println!(
|
|
||||||
"Request sent successfully: {:?}",
|
|
||||||
request
|
|
||||||
); // @TODO remove
|
|
||||||
|
|
||||||
connection.input_stream().read_all_async(
|
connection.input_stream().read_all_async(
|
||||||
Vec::new(),
|
vec![0; 0xfffff], // 1Mb @TODO
|
||||||
Priority::DEFAULT,
|
Priority::DEFAULT,
|
||||||
Some(&Cancellable::new()),
|
Some(&Cancellable::new()),
|
||||||
{
|
{
|
||||||
|result| match result {
|
move |result| match result {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
println!("Result: {:?}", response);
|
println!(
|
||||||
|
"Result: {:?}",
|
||||||
// @TODO connection.close(cancellable);
|
GString::from_utf8_until_nul(
|
||||||
|
response.0
|
||||||
|
)
|
||||||
|
); // @TODO
|
||||||
|
// @TODO connection.close(cancellable);
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
@ -97,7 +96,6 @@ impl Page {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
// @TODO
|
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
eprintln!("Failed to write request: {:?}", e);
|
eprintln!("Failed to write request: {:?}", e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user