public EzQuoteMain() { // Establish the uplink connection (using local Unix domain socket) FrontEndConnection local = new UnixSocketConnection("/tmp/dotss.socket"); local.Connect(); // Instantiate the client context ctx_ = ClientContext.CreateClientEndpointContext(local); // Authenticate the local user ctx_.AuthClient.SelectAuthentication("unix_auth"); ctx_.AuthClient.Authenticate(); ctx_.DebugClient.PrintOnServerConsole("ready to rumble"); }
/// <summary> /// Creates a ClientContext for the specified connection /// </summary> public static ClientContext CreateClientEndpointContext(FrontEndConnection connection) { PacketTransmitter packetTransmitter = new PacketTransmitter(connection); ClientContext ctx = new ClientContext(connection, packetTransmitter); packetTransmitter.StartTransmitting(); return ctx; }
public void Dispose() { try { ctx_.Connection.Close(); } finally { ctx_ = null; } }