mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
Introduce MessageSession, for keeping track of messages to send to clients
This commit is contained in:
parent
92fa52c56f
commit
d85383cfd4
7 changed files with 108 additions and 74 deletions
|
|
@ -6,7 +6,8 @@ use id::{Id, get_id};
|
|||
use partition::Partition;
|
||||
use rbx::RbxInstance;
|
||||
use session::SessionConfig;
|
||||
use vfs_session::{VfsSession, FileItem};
|
||||
use vfs_session::{VfsSession, FileItem, FileChange};
|
||||
use message_session::MessageSession;
|
||||
|
||||
fn file_to_instances(file_item: &FileItem, partition: &Partition, output: &mut HashMap<Id, RbxInstance>, instances_by_route: &mut HashMap<FileRoute, Id>) -> Id {
|
||||
match file_item {
|
||||
|
|
@ -71,7 +72,7 @@ pub struct RbxSession {
|
|||
}
|
||||
|
||||
impl RbxSession {
|
||||
pub fn new(config: SessionConfig, vfs_session: Arc<RwLock<VfsSession>>) -> RbxSession {
|
||||
pub fn new(config: SessionConfig, vfs_session: Arc<RwLock<VfsSession>>, message_session: MessageSession) -> RbxSession {
|
||||
RbxSession {
|
||||
config,
|
||||
vfs_session,
|
||||
|
|
@ -95,4 +96,8 @@ impl RbxSession {
|
|||
self.partition_instances.insert(partition.name.clone(), root_id);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn handle_change(&mut self, change: &FileChange) {
|
||||
println!("Handle RBX change {:?}", change);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue