Example #1
0
        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");
        }
Example #2
0
        private void AcceptCallback(IAsyncResult ar)
        {
            Socket clientSocket;

            lock (_syncLock)
            {
                //Something went wrong
                if (_listeningSocket == null)
                {
                    return;
                }

                clientSocket = _listeningSocket.EndAccept(ar);
                _listeningSocket.BeginAccept(AcceptCallback, null);
            }

            _logger.Info("Accepted connection");
            UnixSocketConnection connection = new UnixSocketConnection(clientSocket);

            RaiseClientConnectedEvent(connection);
        }