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

Savoy HSMS Reference   

Properties
Appearance
BorderStyle
Connect
IniFileName
IniSection
IPAddress
Log
LogBakCount
LogFileName
LogSize
LogVerbose
MyHostName
MyPortNumber
PortNumber
Selected
Server
T3
T5
T6
T7
T8

Methods
AboutBox
Disconnect
LoadIniFile
Send
Setup
ToIPAddress

Events
Connected
Disconnected
Problem
Received
SelChanged

Connect Property

Gets or sets the HSMS connection status. If Connect property is set to true where Server property is false (client), SavoyHsms control will attempt to establish connection. If connection has not been established, Connect property will be set to false.

If Connect property is set to true where Server property is true (server), SavoyHsms control will attempt to open server port and start listening to prepare for future incoming connection. At this time connection has not been established until client connected server. Therefore, even no connection was made, Connect property would be True, when server port was opened.

If user sets False to Connect property, existing connection will be disconnected. User doesn’t have to worry about connection to make sure it is disconnected when application is closing. SavoyHsms control will take care disconnection automatically. When Server property was set to True and Connected property is set to False, all existing connections with clients will be disconnected.

Syntax

Visual Basic

Connect As Boolean


Visual C++

BOOL GetConnect()
void SetConnect(BOOL)

Return Value

Example

Visual Basic

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


Visual C++

m_ctrl.SetIPAddress("hsms_server");
m_ctrl.SetPortNumber(5000);
m_ctrl.SetLocalPortNumber(0);
m_ctrl.SetServer(false);
m_ctrl.SetConnect(true); // Open
if(!m_ctrl.GetConnect())
  MessageBox("Cannot connect to server!");

Remarks

If Connect property on server side was set to False, connection would be disconnected. Therefore, Connect property on client side would also be set to False.

See Also

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