-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Hello, receive a cordial greeting.
Implemented a smpp client as shown below:
public static SmppClient GetSmppClient()
{
var client = new SmppClient();
SmppConnectionProperties properties = client.Properties;
properties.SystemID = "MyID";
properties.Password = "MyPassword";
properties.Port = 1234;
properties.Host = "MyHost";
properties.SystemType = "smpp";
properties.DefaultServiceType = "smpp";
properties.SourceAddress = "6015";
properties.InterfaceVersion = InterfaceVersion.v34;
properties.DefaultEncoding = DataCoding.SMSCDefault;
properties.AddressNpi = NumberingPlanIndicator.ISDN;
properties.AddressTon = TypeOfNumber.International;
client.AutoReconnectDelay = 30000;
client.KeepAliveInterval = 15000;
return client;
}
private void listenMessageReceived()
{
client = GetSmppClient();
client.ConnectionStateChanged += connectionStateChanged;
if (!client.Started)
{
client.ForceConnect();
client.Start();
}
client.MessageReceived += messageReceived;
}
private void messageReceived(object sender, MessageEventArgs e)
{
TextMessage msg = e.ShortMessage as TextMessage;
SetSMSDataGridView(DateTime.Now, msg.SourceAddress, msg.DestinationAddress, msg.Text);
}
public void SetSMSDataGridView(DateTime date, string sourceAddress, string destinationAddress, string text)
{
this.dgvSMS.Rows.Insert(0, date, sourceAddress, destinationAddress, text);
}
The problem is that when I run multiple instances of my program, all SMS are not received in all instances.
As you can see below:
Both instances of the program are running at the same time, but the SMS they receive are different.
Thanks for your help.
Metadata
Metadata
Assignees
Labels
No labels