Ejemplo n.º 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="remoteEndPoint">EndPoint</param>
        public void ConnectTo(IPEndPoint remoteEndPoint)
        {
            Socket = TuringSocket.ConnectTo(remoteEndPoint);
            Socket.EnqueueMessages = true;

            Task = new Task <EFuzzingReturn>(InternalJob);
        }
Ejemplo n.º 2
0
        public void TestTuringSocket()
        {
            using (TuringSocket server = TuringSocket.Bind(new IPEndPoint(IPAddress.Any, 9787)))
            {
                server.OnMessage += Server_OnMessage;

                using (TuringSocket client = TuringSocket.ConnectTo(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9787)))
                {
                    client.OnMessage += Client_OnMessage;
                    client.SendMessage(new OpenStreamMessageRequest()
                    {
                    });

                    for (int x = 0; x < 20 && !isOk; x++)
                    {
                        Thread.Sleep(1000);
                    }
                }
            }

            if (!isOk)
            {
                throw (new System.Exception());
            }
        }