Page 1 of 1

Reading SMS and sending at the same time

Posted: Tue Jul 22, 2008 3:13 am
by crg1970
Hello, and thanks for all your help. This DLL is amazing. I have a question. I need to make a Windows Service that both sends and receives SMS. The services needs to read from a database every minute or so and send SMS messages to phone numbers that have changed status in the database in that minute. At the same time, as far as I understand from the sample code I have a studied, I use an event to monitor the SMPP port and then read from it.

How can I do both things at once (I originally planned on two services, one reading and another sending, but apparently I can't have both of them connected at once) from one windows service??? Is there a way to read the events without it interfering with the reading of the DB and sending the messages and vice-versa??? How is this usually done?

Posted: Mon Aug 04, 2008 5:54 am
by alt
I think you have to use threads in your application. Main thread will receive sms messages and second will send sms from your database.

With an evDeliverSmComplete event, You could avoid read/write process from the DB and just do a write once the message is processed.