title: i am getting exception while sending sms
body: <pre><code>package hu.ozekisms;
  
   import java.io.*;
  import java.util.Scanner;
  
   public class TestTcpSms {
  
  /**
   * @param args
   */
  public static void main(String[] args) {
      try {
          Scanner sc = new Scanner(System.in);
  
  
          String host = "localhost";
          int port = 33049;
          String username = "admin";
          String password = "abc123";
  
          /**
           * Connect to Ozeki NG SMS Gateway and logging in.
           */
  
          MyOzSmsClient osc = new MyOzSmsClient(host, port);
          osc.login(username, password);      
          System.out.println("SMS message:");
  
          /**
           * If logged in send "Text message" to number "+00112233"
           */
  
          if(osc.isLoggedIn()) {
  
              osc.sendMessage("phone number", "Test Message");
  
          }
  
          sc.nextLine();
          osc.logout();
  
          /**
           * Receiving message:
           * 
           * If you want to receive messages you can use doOnMessageReceived in MyOzSmsClient.java
           * That's an event, which runs automatically when a message is received. 
           */
  
      } catch (IOException e) {
          System.out.println(e.toString());
          e.printStackTrace();
      } catch (InterruptedException e) {
          System.out.println(e.toString());
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>package hu.ozekisms;
  
  import java.io.*;
  import java.util.*;
  import hu.ozeki.*;
  
  public class MyOzSmsClient extends OzSmsClient{
  
  public MyOzSmsClient(String host, int port) throws IOException, InterruptedException {
      super(host, port);
      // TODO Auto-generated constructor stub
  }   
  
  @Override
  public void doOnMessageAcceptedForDelivery(OzSMSMessage sms) {
      Date now = new Date();
      System.out.println(now.toString() + " Message accepted for delivery. ID: " + sms.messageId);
  }
  
  @Override
  public void doOnMessageDeliveredToHandset(OzSMSMessage sms) {
      Date now = new Date();
      System.out.println(now.toString() + " Message delivered to handset. ID: " + sms.messageId);
  }
  
  @Override
  public void doOnMessageDeliveredToNetwork(OzSMSMessage sms) {
      Date now = new Date();
      System.out.println(now.toString() + " Message delivered to network. ID: " + sms.messageId);
  }
  
  @Override
  public void doOnMessageDeliveryError(OzSMSMessage sms) {
      Date now = new Date();
      System.out.println(now.toString() + " Message could not be delivered. ID: " + sms.messageId + " Error message: " + sms.errorMessage + "\r\n");
  }
  
  @Override
  public void doOnMessageReceived(OzSMSMessage sms) {
      Date now = new Date();
      System.out.println(now.toString() + " Message received. Sender address: " + sms.sender + " Message text: " + sms.messageData  + " at: "+ sms.receivedDate);
  }
  
  @Override
  public void doOnClientConnectionError(int errorCode, String errorMessage) {
      Date now = new Date();
      System.out.println(now.toString() + " Message code: " + errorCode + ", Message: " + errorMessage);
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>    java.io.IOException: An established connection was aborted by the software in 
      your hostmachine    
      java.io.IOException: An established connection was aborted by the software in 
      yourhost machine                                                                                    
      at sun.nio.ch.SocketDispatcher.read0(Native Method)
      at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
      at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
      at sun.nio.ch.IOUtil.read(IOUtil.java:206)
      at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
      at hu.ozeki.OzSmsClient.run(OzSmsClient.java:87)
  </code></pre>
  
  <p>can anyone fix this error?
  I am sending sms through Ozeki NG SMS Gateway.</p>