/// <summary> /// get the connected TcpClient /// </summary> /// <returns>the TcpClient</returns> public TcpClient getSocket() { if (this.sock == null) { this.sock = ClientGlobal.getSocket(this.inetSockAddr); } return(this.sock); }
/// <summary> /// Constructor /// </summary> /// <param name="ip_addr">the ip address of storage server</param> /// <param name="port">the port of storage server</param> /// <param name="store_path">the store path index on the storage server</param> 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; } }