SendCommand Method

Will format and send a PDU using the specified command identifier and payload.

Syntax

ANSI (Cross Platform)
char* SendCommand(int iCommandId, const char* lpPayload, int lenPayload, int *lpSize = NULL);

Unicode (Windows)
LPSTR SendCommand(INT iCommandId, LPCSTR lpPayload, INT lenPayload, LPINT lpSize = NULL);
- (NSData*)sendCommand:(int)commandId :(NSData*)payload;
#define MID_SMPP_SENDCOMMAND 13

IPWORKS_EXTERNAL int IPWORKS_CALL IPWorks_SMPP_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method offers a way to do more with the class than is directly supported. This method takes a command identifier and a payload, which includes every required and optional field after the header, and will create the 16-byte header for it before sending it to the server. The response PDU is returned both in the PITrail and by this method.

Error Handling (C++)

This method returns a Binary String value (with length lpSize); after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 C++ Edition - Version 20.0 [Build 8307]