Struct aurelius::Listening
[−]
[src]
pub struct Listening { /* fields omitted */ }
A handle to an active preview server.
The server is listening for HTTP requests on a given port, and broadcasting rendered markdown over a websocket connection on another port.
Methods
impl Listening
[src]
pub fn websocket_addr(&self) -> Result<SocketAddr>
[src]
Returns the socket address that the websocket server is listening on.
pub fn http_addr(&self) -> Result<SocketAddr>
[src]
Returns the socket address that the HTTP server is listening on.
pub fn change_working_directory<P>(&mut self, dir: P) where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Changes the "current working directory" of the HTTP server. The HTTP server will serve static file requests out of the new directory.
pub fn send(&self, markdown: &str) -> Result<()>
[src]
Publish new markdown to be rendered by the server.