Note: This article is another article: mgen clo engineering 0.1 and a concise tutorial.
Due to Windows Phone 7.5's Environment restrictions, TCP Connections cannot be monitored ). Therefore, Clo engineering Windows Phone 7 does not support the connectionpoolhost, listenerwaiter, and poolconnection spawn methods. These members all need the TCP listening function.
In addition, the Windows Phone 7.5 clo project does not contain the localipaddress public type in the mgen. Clo. Utilities namespace.
This article focuses on the connection between the Windows Phone 7.5 device and the TCP listener of the clo project PC. The PC listener can use the listenerwaiter or connectionpoolhost type. A Windows Phone 7.5 device can be connected to a PC listener in three ways.
1: Use Zune to connect to the Data Cable
First, the clo project under Windows Phone requires the IP address of the PC. The IP address here can be the IP address of the Ethernet network adapter on the PC after I try it, you can use the ipconfig command to obtain the IP address of the PC's Ethernet Adapter, for example:
You can use the clo project sample program for testing. In the clo project Windows Phone test program, enter the IP address and port number of the PC listener:
After the connection is complete, the clo project demo on the PC side will receive the connection information, such:
The Windows Phone clo project demo will prompt:
Enter the server
Local connection information: 127.0.0.1: 59589
Remote connection information: 219.244.114.50: 11700
Client list
============
1-FIG: 59563
============
As you can see, Zune enables a port directly on the local PC. as a proxy, this port will receive or send data to the connected Windows Phone device.
2. Use WiFi connection
You can also use listenerwaiter to communicate between PCs and Windows Phone devices through WiFi connections. You can also use connectionpoolhost to connect one PC and multiple Windows Phone devices.
Therefore, for a Windows Phone device, the PC-connected listener also needs to know the IP address of the PC, but this time it is not Ethernet, but a wireless network IP address, and the ipconfig command is also used, find the IP address of the current wireless network adapter, for example:
Then, use this IP address to connect to the PC listener in Windows Phone. After the connection is successful, the demo program of ClO engineering windows has the following output:
The Windows Phone clo project demo will prompt:
Enter the server
Local connection information: 192.168.51.101: 49175
Remote connection information: 192.168.51.1: 11700
Client list
============
1-FIG: 59387
============
As you can see, both PC and Windows Phone are connected to the same LAN environment as independent network nodes.
3. Use Internet connection
This method requires that any connected party can access the Internet without being blocked by the firewall. Once all the conditions are successful, you only need to use the Internet IP address of the PC to connect to Windows Phone.