PDA使用WIFI传输文档到PC端如何实现?求各位大侠不吝赐教~
PDA使用WIFI传输文档到PC端怎么实现?求各位大侠不吝赐教~~~
如题,小生在这跪谢了!有参考的代码或者帖子各位不要藏着啊,全部往我这里砸吧,我不嫌多啊!!!!跪谢了~~~~
------解决方案--------------------
如题,小生在这跪谢了!有参考的代码或者帖子各位不要藏着啊,全部往我这里砸吧,我不嫌多啊!!!!跪谢了~~~~
Wi-Fi
PC
文档
WINCE
PDA
------解决方案--------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Threading;
namespace PDA
{
public class WinCESockets
{
private const string DLLPATH = "\\windows\\coredll.dll"; // "kernel32";
///<summary>
///得到时间
///</summary>
[DllImport(DLLPATH)]
public static extern uint GetTickCount();
//建立全局变量
public Thread thread;
// 本地IP地址
public string m_tcpIPAddress;//服务器IP地址
//监听的端口
public int m_tcpListeningPort;
//本地IP
public string localIP;
public bool isConnect = false;
private static int buffer_size = 1024;
private static byte[] clientReceiveBytes = new byte[buffer_size];
private static Socket client_socket = null;
public WinCESockets()
{
IPHostEntry ipHostInfo = Dns.GetHostEntry(Dns.GetHostName());
IPAddress ipAddress = ipHostInfo.AddressList[0];
localIP = ipAddress.ToString();
}
/*建立链接*/
public bool SocketsLink()
{
try
{
client_socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);