Implement Server Logging
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
use super::*;
|
||||
|
||||
use std::fmt;
|
||||
use std::io::*;
|
||||
use std::net::*;
|
||||
|
||||
@ -10,6 +11,14 @@ pub struct Connection<R: Read + Sized, W: Write + Sized> {
|
||||
writer: W,
|
||||
}
|
||||
|
||||
impl<R: Read + Sized, W: Write + Sized> fmt::Display for Connection<R, W> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "<Client>") // Todo use some form of marker??
|
||||
}
|
||||
}
|
||||
|
||||
impl<R: Read + Sized, W: Write + Sized> ClientConnection for Connection<R, W> {}
|
||||
|
||||
const KIB: u32 = 1024;
|
||||
const MIB: u32 = 1024 * 1024;
|
||||
|
||||
|
Reference in New Issue
Block a user