Ejemplo n.º 1
0
        public object SetSocketType(Message msg)
        {
            Type type = msg.WParam as Type;

            if (type == null)
            {
                throw new ArgumentException("msg.WParam 参数必需为类的Type对象");
            }

            m_socket = type.Assembly.CreateInstance(type.FullName) as JSocket;

            if (m_socket == null)
            {
                throw new ArgumentException("msg.WParam 参数必需为继续JSocket的类的Type对象");
            }

            return(null);
        }
Ejemplo n.º 2
0
 void m_socket_ConnectedFaild(JSocket socket)
 {
     OnConnected(false);
 }
Ejemplo n.º 3
0
 void m_socket_ConnectedSuccess(JSocket socket)
 {
     OnConnected(true);
 }
Ejemplo n.º 4
0
 void m_socket_ConnectedSuccess(JSocket socket)
 {
     CreateAndSendMsg(NetMsg.Connected, null, socket);
 }
Ejemplo n.º 5
0
 void m_socket_ConnectedFaild(JSocket socket)
 {
     CreateAndSendMsg(NetMsg.Errored, null, socket);
 }