Connection and bind options.
The live session.
import { connect, DataCoding } from 'edgeport/smpp';
await using smpp = await connect({
hostname: 'smsc.example.com',
systemId: 'esme',
password: env.SMPP_PW,
bindMode: 'transceiver'
});
const id = await smpp.submit({
source: 'EDGEPORT',
destination: '12065550111',
message: 'hello from a Worker',
registeredDelivery: true
});
for await (const inbound of smpp.messages()) {
if (inbound.isDeliveryReceipt) {
const r = inbound.receipt();
if (r.id === id && r.stat === 'DELIVRD') break;
}
}
Connects to an SMSC over TCP, binds as an ESME, and returns a live session.
Dials the core transport (implicit TLS when
tls: 'implicit', otherwise plaintext), binds in the requested mode, and waits for the bind response so an auth failure surfaces here. A background pump then correlates responses and routes inbounddeliver_sms to SmppSession.messages.