LocalPort Property

Description

Returns or sets the local port of the file transfer object. The default is 0 (zero); that is, any valid, unused port.

Syntax
object.LocalPort

Remarks

This property is always available.

If the LocalPort value is 0, any unused valid port would be chosen once the transfer has started. The caller can then check which local port was chosen by checking the LocalPort property again after the transfer has started.

In order to avoid resetting the LocalPort to 0 after a read, use the LocalPortUsed to see which port was used for a file transfer.

For more information about the values of this property, see the Windows Sockets documentation.

See Also

Return to File Transfer Reference.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.