Introduced
Distinctive Windows Phone 8.0 communication
Socket Demo
Get information about the current connection
HTTP RSS odata socket bluetooth NFC VoIP Winsock
Example
1, Demo socket TCP Application (this example is to do both server and client)
Communication/socketdemo.xaml
<phone:phoneapplicationpage x:class= "Demo.Communication.SocketDemo" xmlns= "Http://schemas.microsoft.com/win Fx/2006/xaml/presentation "xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "xmlns:phone=" Clr-namespace: Microsoft.phone.controls;assembly=microsoft.phone "Xmlns:shell=" clr-namespace:microsoft.phone.shell;assembly= Microsoft.phone "xmlns:d=" http://schemas.microsoft.com/expression/blend/2008 "xmlns:mc=" http:// schemas.openxmlformats.org/markup-compatibility/2006 "fontfamily=" {StaticResource PhoneFontFamilyNormal} "FontSiz E= ' {StaticResource phonefontsizenormal} ' foreground= ' {StaticResource Phoneforegroundbrush} ' SupportedOrientations= "Portrait" orientation= "Portrait" mc:ignorable= "D" shell:systemtray.isvisible= "True" > <grid B
ackground= "Transparent" > <stackpanel orientation= "Vertical" > <StackPanel> <button name= "Btnstartlistener" ConTent= "Start a Socket listener" click= "Btnstartlistener_click"/> <button "name=" "content=" connect to the socket listener "click=" Btnconnectlistener_click "margin=" 0 0 0 "/> ; Button Name= "Btnsenddata" content= "Send Data" click= "Btnsenddata_click" margin= "0 0 0"/> <but ton name= "Btnclosesocket" content= "Close server socket and client socket" click= "Btnclosesocket_click" margin= "0 10 0 0"/ > </StackPanel> <textblock name= "lblmsg" textwrapping= "Wrap" margin= "20 0 0 0 "/> </StackPanel> </Grid> </phone:PhoneApplicationPage>