Jump to: content

Ghostcast Server Guide

class GhostCastServer: """Main GhostCast Server Implementation"""

class SessionStatus(Enum): WAITING = "waiting" ACTIVE = "active" COMPLETED = "completed" FAILED = "failed" ghostcast server

class GhostCastClient: def (self, multicast_group='224.0.0.1', port=1236): self.multicast_group = multicast_group self.port = port self.client_id = socket.gethostname() self.session_id = None self.running = False ghostcast server

logging.basicConfig(level=logging.INFO) logger = logging.getLogger() ghostcast server

MAGIC_COOKIE = b'GHOST'

@dataclass class Client: """Client connection information""" client_id: str address: tuple last_heartbeat: float received_chunks: int status: str ip_address: str hostname: str = "Unknown"