Exemple #1
0
 public SmppSubmitSmRes SubmitSm(SmppSubmitSmReq RequestPdu) {
   return _InternalConnection.SubmitSm(RequestPdu);
 }
Exemple #2
0
 public void BeginSubmitSm(SmppSubmitSmReq RequestPdu, SmppSubmitSmResHandler Callback, object State) {
   _InternalConnection.BeginSubmitSm(RequestPdu, Callback, State);
 }
Exemple #3
0
 public void BeginSubmitSm(SmppSubmitSmReq RequestPdu, SmppSubmitSmResHandler Callback) {
   _InternalConnection.BeginSubmitSm(RequestPdu, Callback, null);
 }
 internal SmppSubmitSmRes SubmitSm(SmppSubmitSmReq RequestPdu) {
   var asyncObject = new SmppAsyncObject();
   SendReqPdu(RequestPdu, ref asyncObject);
   return new SmppSubmitSmRes(asyncObject.PduRes);
 }
 internal void BeginSubmitSm(SmppSubmitSmReq RequestPdu, SmppSubmitSmResHandler Callback, object State) {
   InitializeAsyncTransac(RequestPdu, Callback, State);
 }
Exemple #6
0
    void ProcessPdu(Guid ConnGuid, ByteBuilder bb) {
      var header = new SmppHeader(bb);
      if (bb.Count > 0x10)
        bb.ToArray(0x10, bb.Count - 0x10);
      if (((header.CommandId == 2) || (header.CommandId == 1)) || (header.CommandId == 9))
        try {
          var pdu = new SmppBindReq(bb);
          if (OnBindReq != null)
            OnBindReq(this, new SmppBindEventArgs(ConnGuid, pdu));
        } catch {}
      else {
        int commandId = header.CommandId;
        if (commandId <= -2147483627)
          switch (commandId) {
            case -2147483643: {
              var res = new SmppDeliverSmRes(bb);
              if (OnDeliverSmRes != null)
                OnDeliverSmRes(this, new SmppDeliverSmResEventArgs(ConnGuid, res));
              return;
            }
            case -2147483627: {
              var res2 = new SmppEnquireLinkRes(bb);
              if (OnEnquireLinkRes != null) {
                OnEnquireLinkRes(this, new SmppEnquireLinkResEventArgs(ConnGuid, res2));
                return;
              }
              break;
            }
          }
        else
          switch (commandId) {
            case 3: {
              var req4 = new SmppQuerySmReq(bb);
              if (OnQuerySmReq != null)
                OnQuerySmReq(this, new SmppQuerySmEventArgs(req4, ConnGuid));
              return;
            }
            case 4: {
              var req2 = new SmppSubmitSmReq(bb);
              if (OnSubmitSmReq != null)
                OnSubmitSmReq(this, new SmppSubmitSmEventArgs(ConnGuid, req2));
              return;
            }
            case 5:
              return;

            case 6: {
              var req5 = new SmppUnBindReq(bb);
              if (OnUnBindReq != null)
                OnUnBindReq(this, new SmppUnBindEventArgs(ConnGuid, req5));
              return;
            }
            case 0x15: {
              var req3 = new SmppEnquireLinkReq(bb);
              if (OnEnquireLinkReq != null)
                OnEnquireLinkReq(this, new SmppEnquireLinkEventArgs(ConnGuid, req3));
              return;
            }
            default:
              return;
          }
      }
    }