 			lastClientDisconnectTime = nil
 		}
 		do {
-			try send(object: try settings.dao.getUserInfo(user: socket.user))
+			try broadcastToAllClients(object: try settings.dao.getUserInfo(user: socket.user))
 		} catch {
 			Log.logger.error(message: "failed to send BulkUserInfo \(error)", true)
 		}
 	}
 	
+	/// Remove a socket/client from this session
+	///
+	/// - Parameter socket: the socket to remove from this session
 	func remove(socket: SessionSocket) {
 		lockQueue.sync {
 			sockets.remove(socket)

			}
		}
	}
	
	func send<T: Encodable>(object: T) throws {
		let data = try settings.encode(object)
		sockets.forEach { $0.send(data: data) { () in } }
	}

	func closed(socket: SessionSocket) {
		remove(socket: socket)
	}
	
	func handle(command: SessionCommand, socket: SessionSocket) {
		Log.logger.info(message: "got command: \(command)", true)
	}

	var hashValue: Int { return ObjectIdentifier(self).hashValue }
	
	static func == (lhs: Session, rhs: Session) -> Bool {
		return lhs.workspace.id == rhs.workspace.id
	}
}

import Rc2Model
import servermodel

class Session {
	
	let workspace: Workspace
	let settings: AppSettings
