NTAdvFTP61.Socket ActiveX DLL



Identification

NTAdvFTP61.Socket

Description

This is a TCP/IP Socket object.

Enumerators

Direction

NormalStream = 1
TextMessages = 2
SocketPaused = 6
StandByPause = 8

 

States

Closed = 1

Binded = 2

Request = 4

Opening = 8

Opened = 16

Sending = 32

Reading = 64

Closing = 128

Events

Connected ()

Description

This event is raised when the socket connects to a remote host.

DataArriving ()

Description

This event is raised when data arrives from the remote host.

SendComplete ()

Description

This event is raised when send outgoing data has completed.

Disconnected ()

Description

This event is raised when the socket is disconnected from the remote host.

Connection (Handle)

Parameters

Handle Long

Specifies a handle of the listening socket ready to create the connection, this handle should be passed to the Accept() or Decline() function.

Description

This event is raised when an incoming request for a connection is received while the socket is in listening mode.

Error (Number, Source, Message)

Parameters

Number Long

Specifies the error number that has occurred.

Source String

Specifies the source of the error that has occurred

Message String

Specifies the description of the error that has occurred.

Description

This event is raised when an error has occurred with either the object functioning or the socket performing.

Properties

Connected (Boolean) (ReadOnly)

Description

Specifies whether the socket is connected to a remote host.

Listening (Boolean) (ReadOnly)

Description

Specifies whether the socket is listening for a connection.

Transmission (Direction)

Description

Specifies the transmission options and handling of the socket to text messages such as protocol, normal streams such as any binary, or service paused to halt any calls or incoming information but not loose state of the socket.

Functions

Connect ([Host][, Port]) Boolean

Parameters

Host String

Specifies the remote host to connect to.

 

Port Long

Specifies the Port to connect to.

Description

Connects the object to a file system.

Listen ([Host][, Port]) Boolean

Parameters

Host String

Specifies the remote host to connect to.

 

Port Long

Specifies the Port to connect to.

Description

Sets the socket to listen mode to listen for a single incoming connect request.

Disconnect () Variant

Description

Disconnects the object from the file system.

ReadBytes (Data) Byte()

Parameters

Data Byte()

Specifies the variable to received data to from the socket.

Description

Reads data from the socket and returns true if the feature was available to read, otherwise returns false.

ReadString (Data) Boolean

Parameters

Data String

Specifies the variable to received data to from the socket.

Description

Reads data from the socket and returns true if the feature was available to read, otherwise returns false.

Read () String

Description

Reads data from the socket as the return value of the function.

SendBytes (Data) Byte()

Parameters

Data Byte()

Specifies data to send through the socket.

Description

Sends data through the socket and returns true if the feature was available to send else a send was in progress.

SendString (Data) Boolean

Parameters

Data String

Specifies data to send through the socket.

Description

Sends data through the socket and returns true if the feature was available to send else a send was in progress.

Send (Data)

Parameters

Data String

Specifies data to send through the socket.

Description

Sends data through the socket.

Accept (Handle) Boolean

Parameters

Handle Long

Specifies the handle to the listening socket with an incoming connection request.

Description

Accepts an incoming connection from the listening socket specified with handle.

Decline (Handle) Boolean

Parameters

Handle Long

Specifies the handle to the listening socket with an incoming connection request.

Description

Explicitly decline an incoming connection from the listening socket specified with handle.

Automation

Object:Init (self)

Parameters

self Object

A reference to the object.

Description

Optional event that is called when the object is initialized.

Object:Term (self)

Parameters

self Object

A reference to the object.

Description

Optional event that is called when the object is terminated.

Object:Connected (self)

Parameters

self Object

A reference to the object.

Description

Optional event is raised when the socket connects to a remote host.

Object:Connection (self, Handle)

Parameters

self Object

A reference to the object.

Handle Long

A reference to the incoming socket handle that can then be sent to Accpet() or Decline() to control connections from a socket in listening mode.

Description

Optional event is raised when the socket connects to a remote host.

Object:SendComplete (self)

Parameters

self Object

A reference to the object.

 

Description

Optional event is raised when outgoing data has finished sending.

Object:DataArriving (self)

Parameters

self Object

A reference to the object.

 

Description

Optional event is raised when data arrives from the remote host.

Object:Disconnected (self)

Parameters

self Object

A reference to the object.

Description

Optional event is raised when the socket is disconnected from the remote host.