org.csource.fastdfs
Class ServerInfo

java.lang.Object
  extended by org.csource.fastdfs.ServerInfo

public class ServerInfo
extends java.lang.Object

Server Info

Version:
Version 1.7
Author:
Happy Fish / YuQing

Field Summary
protected  java.lang.String ip_addr
           
protected  int port
           
 
Constructor Summary
ServerInfo(java.lang.String ip_addr, int port)
          Constructor
 
Method Summary
 java.net.Socket connect()
          connect to server
 java.lang.String getIpAddr()
          return the ip address
 int getPort()
          return the port of the server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ip_addr

protected java.lang.String ip_addr

port

protected int port
Constructor Detail

ServerInfo

public ServerInfo(java.lang.String ip_addr,
                  int port)
Constructor

Parameters:
ip_addr - address of the server
port - the port of the server
Method Detail

getIpAddr

public java.lang.String getIpAddr()
return the ip address

Returns:
the ip address

getPort

public int getPort()
return the port of the server

Returns:
the port of the server

connect

public java.net.Socket connect()
                        throws java.io.IOException
connect to server

Returns:
connected Socket object
Throws:
java.io.IOException