---
name: "FtpConnect"
section: "3"
platform: "linux"
package: "ftplib-dev"
version: "3.1-1-9"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/FtpConnect"
---

# FtpConnect(3)

Connect to an FTP server.

## NAME

FtpConnect - Connect to an FTP server.

## SYNOPSIS

**#include \<ftplib.h\>**\

**int FtpConnect(const char \****host***, netbuf \*\****nControl***);**

## PARAMETERS

- **host**

  The name of the host machine to connect to and optionally an alternate port number to use.

- **nControl**

  The address where the pointer to the newly created control handle should be stored.

## DESCRIPTION

FtpConnect() establishes a connection to the FTP server on the specified machine and returns a handle which can be used to initiate data transfers. The host name should be specified as or :.may be either a host name or ip address. may be either a service name or a port number.

## RETURN VALUE

If the connection to the remote server if successful, FtpConnect() returns 1. Otherwise, 0 is returned.
