Represents a connection to the NetWare server.
Returns the NetAddress object that represents the client address.
object.Address
NetAddress.
Read-only.
This example returns the NetAddress object that represents the client address.
’Find the 10th connection and list the connection information
set srv = createobject ("ucx:Server")
set conns = srv.clients
set Connection=conns.Element(10)
print (Connection.Address.Node) &" is the address of the client"
Determines whether or not the current connection has console rights.
object.ConsoleRight
Boolean.
Read-only.
This example determines whether or not the current connection has console rights.
’Find the 10th connection and list the connection information
set srv = createobject ("ucx:Server")
set conns = srv.clients
set Connection=conns.Element(10)
print (Connection.ConsoleRight)
Returns the connection ID number.
object.Id
Integer.
Read-only.
This example returns the connection ID number.
’Find the 10th connection and list the connection information
set srv = createobject ("ucx:Server")
set conns = srv.clients
set Connection=conns.Element(10)
print (Connection.Id) &' is the connection ID'
Returns the login time.
object.LoginTime
Date.
Read-only.
This example returns the login time.
’Find the 10th connection and list the connection information
set srv = createobject ("ucx:Server")
set conns = srv.clients
set Connection=conns.Element(10)
print (FormatDateTime(connection.logintime, vbLongDate))
Returns the connection name.
object.Name
String.
Read-only.
This example returns the connection name.
’Find the 10th connection and list the connection information
set srv = createobject ("ucx:Server")
set conns = srv.clients
set Connection=conns.Element(10)
print (Connection.Name) &' is the connection name'
Disconnects the client connection.
object.Disconnect()
None.
Boolean. Returns TRUE if the connection is successfully disconnected; otherwise, returns FALSE.
This example disconnects the client connection.
’Find the 10th connection and send a message
set srv = createobject ("ucx:Server")
set conns = srv.Clients
set Connection=conns.Element(10)
if (connection.disconnect()) Then
print "Disconnected the first connection"
else
print "Failed to disconnect the first connection"
end if
Sends a broadcast message to the current client connection.
object.Send(
Message As String)
The message to send to the client.
Boolean. Returns TRUE if the message is sent; otherwise, FALSE.
This example sends the message "This connection is being terminated" to the current client connection.
’Find the 10th connection and send a message
set srv = createobject ("ucx:Server")
set conns = srv.Clients
set Connection=conns.Element(10)
if (connection.send (" This connection is being terminated") ) then
print "Sent a broadcast message to " " &connection.name
else
print "Failed to send a broadcast message to "&connection.name
end if