C# SMS API disconnect

To disconnect the C# SMS API from the SMS Gateway, you need to call the Client.Disconnect() method. This will tear down the previously established link you have created with C# SMS client connect method.

C# sms api disconnect method
Figure 1 - C# sms api disconnect call

The C#/.Net SMS api disconnect method

To disconnect the the C# SMS api client from the SMS gateway you need to call the Disconnect method of the sms client(). If you call this method on a link that is not open, nothing will happen. If you call it on an open link, the C# sms api will tear down the IP sms link between your application and the SMS gateway.

C# sms api disconnect example:

Console.WriteLine("Disconnecting the C# SMS client");
Client.Disconnect();

Note, the disconnect method will stop your C# sms client to send keepalive requests to the server. While the client is disconnected, the SMS gateway will store your incoming messages in the inbox folder. (This is why Ozeki 10 SMS gateway is actually an SMS Server).

More information