1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

add StreamConfiguration service

This commit is contained in:
Nikolay Kim
2018-10-01 22:23:02 -07:00
parent 7c78797d9b
commit c674ea9126
10 changed files with 160 additions and 30 deletions

View File

@ -1016,7 +1016,10 @@ fn test_server_cookies() {
#[test]
fn test_custom_pipeline() {
use actix::System;
use actix_web::server::{HttpService, KeepAlive, WorkerSettings};
use actix_net::service::NewServiceExt;
use actix_web::server::{
HttpService, KeepAlive, StreamConfiguration, WorkerSettings,
};
let addr = test::TestServer::unused_addr();
@ -1034,7 +1037,9 @@ fn test_custom_pipeline() {
.server_address(addr)
.finish();
HttpService::new(settings)
StreamConfiguration::new()
.nodelay(true)
.and_then(HttpService::new(settings))
}).unwrap()
.run();
});

View File

@ -7,7 +7,7 @@ extern crate rand;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::{thread, time};
use std::thread;
use bytes::Bytes;
use futures::Stream;