1 14 15 package org.quickserver.net.client; 16 17 import java.io.*; 18 import java.net.*; 19 20 25 public interface ClientService { 26 public static final int BLOCKING = 1; 28 public static final int NON_BLOCKING = 2; 29 30 33 public int getMode(); 34 35 36 public void connect(String host, int port) throws IOException; 37 38 public boolean isConnected(); 39 40 public void close() throws IOException; 41 42 43 public void sendBinary(byte[] data) throws IOException; 44 45 public void sendBytes(String data) throws IOException; 46 47 public void sendString(String data) throws IOException; 48 49 public void sendObject(Object data) throws IOException; 50 51 52 public byte[] readBinary() throws IOException; 53 54 public String readBytes() throws IOException; 55 56 public String readString() throws IOException; 57 58 public Object readObject() throws IOException, ClassNotFoundException ; 59 60 61 public Socket getSocket(); 62 63 } | Popular Tags |