mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
ServeSession -> Session
This commit is contained in:
parent
214c93dc95
commit
1129c2e679
4 changed files with 10 additions and 10 deletions
|
|
@ -7,7 +7,7 @@ use std::{
|
|||
use ::{
|
||||
project::Project,
|
||||
web::Server,
|
||||
serve_session::ServeSession,
|
||||
session::Session,
|
||||
roblox_studio,
|
||||
};
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ pub fn serve(fuzzy_project_location: &Path) {
|
|||
|
||||
roblox_studio::install_bundled_plugin().unwrap();
|
||||
|
||||
let session = Arc::new(ServeSession::new(project));
|
||||
let session = Arc::new(Session::new(project));
|
||||
let server = Server::new(Arc::from(session));
|
||||
|
||||
println!("Server listening on port 8000.");
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ pub mod pathext;
|
|||
pub mod project;
|
||||
pub mod rbx;
|
||||
pub mod roblox_studio;
|
||||
pub mod serve_session;
|
||||
pub mod session;
|
||||
pub mod web;
|
||||
pub mod web_util;
|
||||
|
|
@ -8,15 +8,15 @@ use ::{
|
|||
project::Project,
|
||||
};
|
||||
|
||||
pub struct ServeSession {
|
||||
pub struct Session {
|
||||
project: Project,
|
||||
message_queue: Arc<MessageQueue>,
|
||||
tree: Arc<RbxTree>,
|
||||
}
|
||||
|
||||
impl ServeSession {
|
||||
pub fn new(project: Project) -> ServeSession {
|
||||
ServeSession {
|
||||
impl Session {
|
||||
pub fn new(project: Project) -> Session {
|
||||
Session {
|
||||
project,
|
||||
message_queue: Arc::new(MessageQueue::new()),
|
||||
tree: Arc::new(RbxTree::new()),
|
||||
|
|
@ -10,7 +10,7 @@ use ::{
|
|||
message_queue::Message,
|
||||
project::Project,
|
||||
rbx::RbxInstance,
|
||||
serve_session::ServeSession,
|
||||
session::Session,
|
||||
};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
|
|
@ -39,13 +39,13 @@ pub struct SubscribeResponse<'a> {
|
|||
}
|
||||
|
||||
pub struct Server {
|
||||
session: Arc<ServeSession>,
|
||||
session: Arc<Session>,
|
||||
server_version: &'static str,
|
||||
server_id: String,
|
||||
}
|
||||
|
||||
impl Server {
|
||||
pub fn new(session: Arc<ServeSession>) -> Server {
|
||||
pub fn new(session: Arc<Session>) -> Server {
|
||||
let server_id = rand::random::<u64>().to_string();
|
||||
|
||||
Server {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue