Ejemplo n.º 1
0
 /// <summary>
 /// 连接到服务器
 /// </summary>
 /// <param name="proxyType">代理类型</param>
 /// <param name="ip">IP</param>
 /// <param name="port">端口</param>
 /// <param name="proxyIp">代理IP</param>
 /// <param name="proxyPort">代理端口</param>
 /// <param name="proxyUserName">用户名</param>
 /// <param name="proxyUserPwd">密码</param>
 /// <param name="proxyDomain">域</param>
 /// <param name="timeout">超时</param>
 /// <returns>状态</returns>
 public static int connectToServer(int proxyType, String ip, int port, String proxyIp, int proxyPort, String proxyUserName, String proxyUserPwd, String proxyDomain, int timeout)
 {
     FCClientSockets.setListener(new FCClientSocketListener());
     return(FCClientSockets.connect(0, proxyType, ip, (short)port, proxyIp, (short)proxyPort, proxyUserName, proxyUserPwd, proxyDomain, timeout));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 连接服务器
        /// </summary>
        /// <param name="ip">地址</param>
        /// <param name="port">端口</param>
        public static int connect(String ip, int port)
        {
            int socketID = FCClientSockets.connect(0, 0, ip, port, "", 0, "", "", "", 30000);

            return(socketID);
        }