Hai .....sir/mam! ...Sorry to my English
Present i am doing a windows mobile 6.o application,my problem is ...i completed successfully sending sms,but i can't do receiving sms through listening port (receive sms could not go to inbox),and where it will apply that code(syntax),
How can i listen and create port?
How can i receive the message?
please send me developed code in c#.net.
This My listening code:please correct my code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net.Sockets;
using System.IO.Ports;
using System.IO;
using System.Net;
namespace DeviceApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
int port = 123456;
int backlog = 3;
// create the socket
Socket listenSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp);
// bind the listening socket to the port
// IPAddress hostIP = (Dns.Resolve(IPAddress.Any.ToString())).AddressList[0];
IPAddress hostIP = Dns.GetHostEntry(IPAddress.Any.ToString()).AddressList[0];
IPEndPoint ep = new IPEndPoint(hostIP, port);
listenSocket.Bind(ep);
// start listening
MessageBox.Show("start the listening");
listenSocket.Listen(backlog);
MessageBox.Show("after listening");
}
}
}
I am new one to this.once again sorry to my English,any please help me any one.