Provides information about a single client connection.
Gives the client address.
object.Address()
String.
Read-only.
This example gives the client address.
’Usage: Run this sample, make client connections
’Send welcome message to all clients
Sub srvskt_conn
set connsrv=CreateObject("UCX:NWSrvSkt")
connsrv.Port = 8080
connsrv.Protocol = TCP
connsrv.Listen = True
’Wait in infinite loop for client connections
print "Listening for client connections "
Set cs = csrstsrv.Clients
while true
Wend
End Sub
Sub connsrv_connect(conn)
Print "A new connection from: "
Print Conn.Address &" : " & Conn.port
’Send welcome message
conn.Send ("Welcome to NSN Socket Services")
End Sub
Gives the client port number.
object.Port()
Long.
Read-only.
This example gives the client port number.
’Usage: Run this sample, make client connections
’Send welcome message to all clients
Sub srvskt_conn
set connsrv=CreateObject("UCX:NWSrvSkt")
connsrv.Port = 8080
connsrv.Protocol = TCP
connsrv.Listen = True
’Wait in infinite loop for client connections
Print "Listening for client connections "
Set cs = csrstsrv.Clients
while true
Wend
End Sub
Sub connsrv_connect(conn)
Print "A new connection from: "
Print Conn.Address &" : " & Conn.port
’Send welcome message
conn.Send ("Welcome to NSN Socket Services")
End Sub
Sends data to the client identified by this connection.
object.Send(
Data As Variant)
Any type of data (such as a string of text).
Boolean. Returns TRUE if the data is sent; otherwise, FALSE.
This example sends the message "Welcome to NSN Socket Services" to the client identified by this collection.
’Usage: Run this sample, make client connections
’Send welcome message to all clients
Sub srvskt_conn
set connsrv=CreateObject("UCX:NWSrvSkt")
connsrv.Port = 8080
connsrv.Protocol = TCP
connsrv.Listen = True
’Wait in infinite loop for client connections
Print "Listening for client connections "
Set cs = csrstsrv.Clients
while true
Wend
End Sub
Sub connsrv_connect(conn)
Print "A new connection from: "
Print Conn.Address &" : " & Conn.port
’Send welcome message
conn.Send ("Welcome to NSN Socket Services")
End Sub