private static void OnSessionConnected(object sender, SmppEventArgs args) { // Test bind status? // Send Bind PDU to SMSC asynchronously Console.WriteLine("Successfully connected to SMSC. Now binding..."); bind_transceiver bindPdu = new bind_transceiver("RON-HAY-LAP", "test", "", new interface_version(), // Default is version 3.4 new address_range()); _smppSession.BeginBindTransceiver(bindPdu, new AsyncCallback(BindTransceiverCallback)); }
// Called when the connection to SMSC is established private void OnSessionConnected(object sender, SmppEventArgs args) { // Update the SMSC connection status and related controls SetSmscConnectionStatus(SmscConnectionStatus.Connected); // Send Bind PDU to SMSC asynchronously bind_transceiver bindPdu = new bind_transceiver(smscSystemId_, smscPassword_, "", new interface_version(), // Default is version 3.4 new address_range()); bindPdu.SystemType = smscSystemType_; smppSession_.BeginBindTransceiver(bindPdu, new AsyncCallback(BindTransceiverCallback)); SetSmscConnectionStatus(SmscConnectionStatus.Bound); }