Example #1
0
 public Listener(IPEndPoint ipep, PacketskHandler handler)
 {
     m_Accepted         = new Queue <Socket>();
     m_AcceptedSyncRoot = ((ICollection)m_Accepted).SyncRoot;
     m_OnAccept         = new AsyncCallback(OnAccept);
     m_Listener         = Bind(ipep);
     this.m_Handler     = handler;
 }
Example #2
0
 public Listener(IPEndPoint ipep, PacketskHandler handler)
 {
     m_Accepted = new Queue<Socket>();
     m_AcceptedSyncRoot = ((ICollection)m_Accepted).SyncRoot;
     m_OnAccept = new AsyncCallback(OnAccept);
     m_Listener = Bind(ipep);
     this.m_Handler = handler;
 }
Example #3
0
 public Client(string Name , PacketskHandler hander)
 {
     proxyIp = ConfigurationManager.AppSettings.Get("proxyIp").Split('.');
     //m_Thread = new Thread(new ThreadStart(ThreadStartHander));
     //m_Thread.Name = Name;
     //m_Thread.Start();
     m_Buffer = new ByteQueue(this);
     this.m_PacketsHander = hander;
     this.m_Disposed = false;
 }
Example #4
0
        public static void Main(string[] args)
        {
            int m_ProcessorCount = Environment.ProcessorCount;
            if (m_ProcessorCount > 1)
                m_MultiProcessor = true;
            if (m_MultiProcessor || Is64Bit)
                Console.WriteLine("Core: Optimizing for {0} {2}processor{1}", m_ProcessorCount, m_ProcessorCount == 1 ? "" : "s", Is64Bit ? "64-bit " : "");

            SocketPool.Create();
            PacketskHandler packetsHandler = new PacketskHandler();
            while (m_Signal.WaitOne())
            {

            }
        }
 public LocalClient(string p, PacketskHandler m_Handler)
     : base(p, m_Handler)
 {
     m_Peek = new byte[4];
 }