Jazz Soft Contact us?   JazzSoft@live.com     English   English  Japanese  Chinese (Traditional)  Chinese (Simlified)
Factory Automation & Yield Management Solution Provider 
Skip Navigation LinksHome > Products > Swing > Swing HSMS Reference > Properties > Active

Swing HSMS Reference   

Properties
Active
Appearance
BorderStyle
IniFile
IniSection
IPAddress
LocalPortNumber
Log
LogFile
MaxLength
PortNumber
Selected
Server
Show
T3
T5
T6
T7
T8

Methods
Config
ConvertIPAddress
Disconnect
GetHostName
LoadIni
Send

Events
Connected
Errors
Read
SelConnection

Active Property

The Action of this property depends upon Server Property.

First, if Server Property is True, ActiveX control opens TCP port specified by LocalPortNumber Property and wait for connection from client. At this time, connection is not established -- when client connects server, it will have connected. Active Property becomes True when TCP port has been opened successfully, although connection has not established.

Besides this, if Server Property is False, ActiveX control attempts to connect to server specified by IPAddress Property and PortNumber Property. It is possible to use IP address or computer name (host name) for IPAddress Property. If server is running on the same computer, it is possible to specify IPAddress Property as "" (empty). TCP port number of your computer can be specified by LocalPortNumber Property, however it is possible to let server determine free TCP port number automatically. If TCP port number is fixed number, it may take very long time to establish connection, so auto numbering faculty is very useful. To use auto numbering, set LocalPortNumber Property 0. When connection has been successfully established, Active Property becomes True.

If you set this property False, then connection will be lost. Don’t worry to forget to disconnect established connection at termination of application. ActiveX control automatically delete all of the connection. When Active Property on server side is set to False, then all the connections between each client are disconnected.

Syntax

Visual Basic



Visual C++


Return Value

Example

Visual Basic

.IPAddress = "hsms_server"
.PortNumber = 5000
.LocalPortNumber = 0
.Server = False
.Active = True   ' Open
If Not .Active then
  MsgBox "Cannot connect to server!"
End If


Visual C++

m_hsms.SetIPAddress("hsms_server");
m_hsms.SetPortNumber(5000);
m_hsms.SetLocalPortNumber(0);
m_hsms.SetServer(false);
m_hsms.SetActive(true);   // Open
if(!m_hsms.GetActive())
  MessageBox("Cannot connect to server!");

Remarks

If the other side of Active Property is set to False, connection will be disappeared (like spouse relationship). Please notice that Active Property will be set to False automatically at this time whatever it is client.

See Also

Contact us?   JazzSoft@live.com
  Copyright © 1997 - 2018 Jazz Soft, Inc.