Esempio n. 1
0
        public PacketIF(String server, int port, bool local, bool asClient)
        {
            Debug.Assert(server != null);

            wpClientData = this;
            workProcInstalled = false;

            socket = null;
            error = false;
            deferPacketHandling = false;
            deleting = false;
            packetSender = false;

            line = "";

            echoCallback = null;
            echoClientData = null;
            endReceiving = true;

            linkHandler = null;
            stallingWorker = null;
            stallingWorkerData = null;

            if (asClient)
                connectAsClient(server, port, local);
            else
                connectAsServer(port);

            output_queue = new List<QueuedBytes>();

            if (!error)
            {
                installInputHandler();
            }
        }
Esempio n. 2
0
 protected virtual void installLinkHandler()
 {
     linkHandler = new LinkHandler(this);
 }