/** * get the connected socket * * @return the socket */ public Socket getSocket() { if (this.sock == null) { this.sock = ClientGlobal.getSocket(this.inetSockAddr); } return(this.sock); }
/** * Constructor * * @param ip_addr the ip address of storage server * @param port the port of storage server * @param store_path the store path index on the storage server */ public StorageServer(String ip_addr, int port, byte store_path) : base(ClientGlobal.getSocket( ip_addr, port), new IPEndPoint(IPAddress.Parse(ip_addr), port)) { if (store_path < 0) { this.store_path_index = 256 + store_path; } else { this.store_path_index = store_path; } }