Reading SMS and sending at the same time

Smpp v3.4 client

Moderator: alt

Locked
crg1970
Posts: 6
Joined: Wed Jul 16, 2008 5:48 pm
Location: Panama

Reading SMS and sending at the same time

Post by crg1970 » Tue Jul 22, 2008 3:13 am

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?
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Mon Aug 04, 2008 5:54 am

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.
Locked