Skip to content

Commit

Permalink
Clean up HTTP server example
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <nick@nickspinale.com>
  • Loading branch information
nspin committed Oct 2, 2023
1 parent 1fb6351 commit 17dad86
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/examples/microkit/http-server/pds/server/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ use server::Server;
const HTTP_PORT: u16 = 80;
const HTTPS_PORT: u16 = 443;

type SocketUser<T> = Box<
dyn Fn(
Server<fat::BlockIOWrapper<T>, fat::DummyTimeSource>,
TcpSocketWrapper,
) -> LocalBoxFuture<'static, ()>,
>;

pub async fn run_server<T: BlockIO<BlockSize = constant_block_sizes::BlockSize512> + Clone>(
_timers_ctx: SharedTimers,
network_ctx: SharedNetwork,
Expand Down Expand Up @@ -106,6 +99,13 @@ pub async fn run_server<T: BlockIO<BlockSize = constant_block_sizes::BlockSize51
future::pending().await
}

type SocketUser<T> = Box<
dyn Fn(
Server<fat::BlockIOWrapper<T>, fat::DummyTimeSource>,
TcpSocketWrapper,
) -> LocalBoxFuture<'static, ()>,
>;

async fn use_socket_for_http<D: fat::BlockDevice + 'static, T: fat::TimeSource + 'static>(
server: Server<D, T>,
mut socket: TcpSocketWrapper,
Expand Down

0 comments on commit 17dad86

Please sign in to comment.