Package serverLogic

Interface ServerConnection

All Known Implementing Classes:
DatagramServerConnection, UdpConnectionBlockDecorator, UdpServerConnection

public interface ServerConnection
Provides abstract server connection. Use factory methods to create the connection.
Since:
2.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Method for close a connection
    void
    Method for open a connection.
    sendData (byte[] bytesToSend)
    Method for send data to a server
  • Method Details

    • openConnection

      void openConnection() throws IOException
      Method for open a connection.
      Throws:
      IOException - if I/O occurs
    • closeConnection

      void closeConnection() throws IOException
      Method for close a connection
      Throws:
      IOException - if I/O occurs
    • sendData

      InputStream sendData (byte[] bytesToSend) throws IOException
      Method for send data to a server
      Parameters:
      bytesToSend - bytes to send
      Returns:
      Response from a server
      Throws:
      IOException - if I/O occurs