Esempio n. 1
0
//Assing a temporal instance of CSocketMaster to a
//socket and register this socket to the accept list.
        public static void RegisterAccept(int lngSocket)
        {
            if (m_colAcceptList == null)
            {
                m_colAcceptList = new Collection();
                Debug.Print("OK Created accept collection");
            }
            CSocketMaster Socket = null;

            Socket = new CSocketMaster();
            Socket.Accept(ref lngSocket);
            m_colAcceptList.Add(Socket, "S" + lngSocket);
        }
Esempio n. 2
0
//It turns a CSocketMaster instance pointer into an actual instance.
        private static CSocketMaster SocketObjectFromPointer(int lngPointer)
        {
            CSocketMaster functionReturnValue = null;

            CSocketMaster objSocket = null;

            //UPGRADE_WARNING: Couldn't resolve default property of object objSocket. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            api_CopyMemory(ref objSocket, ref lngPointer, 4);
            functionReturnValue = objSocket;
            //UPGRADE_WARNING: Couldn't resolve default property of object objSocket. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            api_CopyMemory(ref objSocket, ref 0, 4);
            return(functionReturnValue);
        }