Ejemplo n.º 1
0
        /// <summary> Creates a new instance of Connection, with inbound and outbound
        /// communication on a single port.
        /// </summary>
        public NuGenConnection(Parser parser, LowerLayerProtocol llp, System.Net.Sockets.TcpClient bidirectional)
        {
            init(parser);
            ackWriter  = llp.getWriter(bidirectional.GetStream());
            sendWriter = ackWriter;
            sockets.Add(bidirectional);
            NuGenReceiver r = new NuGenReceiver(this, llp.getReader(bidirectional.GetStream()));

            r.start();
            receivers.Add(r);
            this.initiator = new NuGenInitiator(this);
        }
Ejemplo n.º 2
0
        /// <summary> Creates a new instance of Connection, with inbound communication on one
        /// port and outbound on another.
        /// </summary>
        public NuGenConnection(Parser parser, LowerLayerProtocol llp, System.Net.Sockets.TcpClient inbound, System.Net.Sockets.TcpClient outbound)
        {
            init(parser);
            ackWriter  = llp.getWriter(inbound.GetStream());
            sendWriter = llp.getWriter(outbound.GetStream());
            sockets.Add(outbound);             //always add outbound first ... see getRemoteAddress()
            sockets.Add(inbound);
            NuGenReceiver inRec  = new NuGenReceiver(this, llp.getReader(inbound.GetStream()));
            NuGenReceiver outRec = new NuGenReceiver(this, llp.getReader(outbound.GetStream()));

            inRec.start();
            outRec.start();
            receivers.Add(inRec);
            receivers.Add(outRec);
            this.initiator = new NuGenInitiator(this);
        }
Ejemplo n.º 3
0
 public Grunt(NuGenReceiver enclosingInstance, NuGenConnection conn, System.String message)
 {
     InitBlock(enclosingInstance);
     this.conn = conn;
     this.m    = message;
 }
Ejemplo n.º 4
0
 private void  InitBlock(NuGenReceiver enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
Ejemplo n.º 5
0
			public Grunt(NuGenReceiver enclosingInstance, NuGenConnection conn, System.String message)
			{
				InitBlock(enclosingInstance);
				this.conn = conn;
				this.m = message;
			}
Ejemplo n.º 6
0
			private void  InitBlock(NuGenReceiver enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}
Ejemplo n.º 7
0
		/// <summary> Creates a new instance of Connection, with inbound communication on one 
		/// port and outbound on another.
		/// </summary>
		public NuGenConnection(Parser parser, LowerLayerProtocol llp, System.Net.Sockets.TcpClient inbound, System.Net.Sockets.TcpClient outbound)
		{
			init(parser);
			ackWriter = llp.getWriter(inbound.GetStream());
			sendWriter = llp.getWriter(outbound.GetStream());
			sockets.Add(outbound); //always add outbound first ... see getRemoteAddress()
			sockets.Add(inbound);
			NuGenReceiver inRec = new NuGenReceiver(this, llp.getReader(inbound.GetStream()));
			NuGenReceiver outRec = new NuGenReceiver(this, llp.getReader(outbound.GetStream()));
			inRec.start();
			outRec.start();
			receivers.Add(inRec);
			receivers.Add(outRec);
			this.initiator = new NuGenInitiator(this);
		}
Ejemplo n.º 8
0
		/// <summary> Creates a new instance of Connection, with inbound and outbound 
		/// communication on a single port. 
		/// </summary>
		public NuGenConnection(Parser parser, LowerLayerProtocol llp, System.Net.Sockets.TcpClient bidirectional)
		{
			init(parser);
			ackWriter = llp.getWriter(bidirectional.GetStream());
			sendWriter = ackWriter;
			sockets.Add(bidirectional);
			NuGenReceiver r = new NuGenReceiver(this, llp.getReader(bidirectional.GetStream()));
			r.start();
			receivers.Add(r);
			this.initiator = new NuGenInitiator(this);
		}