Пример #1
0
        public MEETSockConnection(
            MEETIFace parent,
            MEETIPEndPoint local,
            MEETIPEndPoint remote,
            MEETPCQueue theInQ,
            MEETPCQueue theOutQ,
            bool isStream)
        {
            m_ifParent   = parent;
            m_ipepLocal  = local;
            m_ipepRemote = remote;
            m_isStream   = isStream;
            m_inQ        = theInQ;
            m_outQ       = theOutQ;

            try {
                // TODO support for Raw Sockets
                if (m_isStream)
                {
                    m_sock = new Socket(AddressFamily.InterNetwork,
                                        SocketType.Stream, ProtocolType.Tcp);
                }
                else
                {
                    m_sock = new Socket(AddressFamily.InterNetwork,
                                        SocketType.Dgram, ProtocolType.Udp);
                }
                m_sock.Bind(m_ipepLocal);
                m_sock.Connect(m_ipepRemote);
            } catch (Exception ex) {
                m_sock     = null;
                m_errorSrc = ex;
            }
        }
Пример #2
0
        // public UdpListenerThread(MEETNode node, MEETIFace iface)
        //	: this(node, iface, UDPLISTENER_DEFAULT_PORT) {}

        public MEETUdpSockListener(
            string theName,
            MEETContainer theContainer,
            MEETSockConnection conn,
            MEETPCQueue meetQ
            ) : base(theName, theContainer, conn, meetQ)
        {
            buffer = new byte[UDP_BUF_SIZE];
        }
 public MEETSockSender(
     string theName,
     MEETContainer theContainer,
     MEETSockConnection conn,
     MEETPCQueue inputQ
     ) : base(theName, theContainer, inputQ)
 {
     m_conn = conn;
 }
Пример #4
0
        // public UdpListenerThread(MEETNode node, MEETIFace iface)
        //	: this(node, iface, UDPLISTENER_DEFAULT_PORT) {}

        public MEETSockListener(
            string theName,
            MEETContainer theContainer,
            MEETSockConnection conn,
            MEETPCQueue recvQ
            ) : base(theName, theContainer)
        {
            m_conn  = conn;
            m_recvQ = recvQ;
        }
 public MEETTcpSockSender(
     string theName,
     MEETContainer theContainer,
     MEETSockConnection conn,
     MEETPCQueue inputQ) : base(theName, theContainer, conn, inputQ)
 {
     buffer = new byte[1400];
     ms     = new MemoryStream(buffer);
     bw     = new BinaryWriter(ms);
     bw.Write(MEETPacket.MEET_MAGIC);
 }
Пример #6
0
 public MEETTcpSockListener(
     string theName,
     MEETContainer theContainer,
     MEETSockConnection conn,
     MEETPCQueue meetQ
     ) : base(theName, theContainer, conn, meetQ)
 {
     //
     // TODO: Add constructor logic here
     //
 }
Пример #7
0
 public MEETQModule(string theName, MEETContainer theContainer, MEETPCQueue q) :
     base(theName, theContainer)
 {
     m_inputQ = q;
 }
 public MEETInDespatch(string theName, MEETContainer theContainer, MEETPCQueue theQ) :
     base(theName, theContainer, theQ)
 {
 }