Skip to content

Communication for sending data between pocket pc and pc

Saumya Agarwal

Asked Mar 21, 2018, 1:36 AM EDT1 answer
Share
LinkedInX
Hi,
 
I am sending data over wifi through socket connection to communicate between pocket pc and pc but unable to do it.
 
The connection is refused. The same i can send when connecting via bluetooth.
 
My code for connecting is as follows:
 
Client: Pocket pc
  1. RemoteClient remoteClient = new RemoteClient(ipaddress, Int32.Parse(port));  
  2. remoteClient.myEvent += new RemoteClient.EventDelegate(this.RemoteClient_MessageReceived);  
  3. remoteClient.SendMessage(tag.TagID);  
  4. Server:  
  5. / listen on port m_serverPort  
  6. TcpListener tcpServer = new TcpListener(m_serverPort);  
  7. // report where we are  
  8. IPHostEntry thisHost = Dns.Resolve(Dns.GetHostName());  
  9. ShowMessage(String.Format("Host {0} listening on {1}, port {2}",  
  10. thisHost.HostName, thisHost.AddressList[0].ToString(), m_serverPort));  
  11. tcpServer.Start();  
  12. TcpClient clientConn = tcpServer.AcceptTcpClient();  
  13. // Send back a message  
  14. response = m_sendMessageText;  
Please let me know for any other details needed.
 
Help...urgent!!!
Thanks,
Saumya

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi All,
     
    I got the solution for the above query, it was firewall issue. After enabling it i can send the data with socket connection over wifi.
     
    Regards,
    Saumya 
    0