Dear ALT,
hope you are doing well,,
currently i want to develop an smpp server that accepts connections from customer,
i want to know how i can return to the customer that your user name is wrong or your password is long
and just check the information server_evbind or there is another event
best regards
check user information when binding
Re: check user information when binding
Following code shows how you can return non-OK status to client.
Also you can use another statuses such as ESME_RALYBND, ESME_RBINDFAIL
Code: Select all
_server.evClientBind += server_evClientBind;
private void server_evClientBind(object sender, Inetlab.SMPP.Common.SmppServerClient client, Inetlab.SMPP.PDU.Bind data)
{
data.Response.ChangeSystemId("My SMPP Server");
//Check SMPP access, and if it is wrong retund Bind Failed.
if (data.SystemId == "")
{
data.Response.Status = CommandStatus.ESME_RINVSYSID;
return;
}
if (data.Password == "")
{
data.Response.Status = CommandStatus.ESME_RINVPASWD;
return;
}
}