NETCONNECTSENDVALUE

Synopsis
NETCONNECTSENDVALUE data
Description

Sends data out the connection that was created with NETCONNECTON.

NETCONNECTSENDVALUE outputs TRUE if the data were successfully queued to be sent. Otherwise, it outputs FALSE (meaning that it's not ready to send). If it outputs FALSE, you must wait until the sendready callback procedure of NETCONNECTON is run and then try sending the data again.

The data input is a list. It contains the data you wish to send over the network.

Example

The following example sets up both a client and a server. The client (connector) sends data to the server (accepter).

NETSTARTUP ; Start up the network

; Wait for someone to connect to you on port 5124
SHOW NETACCEPTON 5124 [] [PRINT NETACCEPTRECEIVEVALUE]
true

; Connect to local machine on port 5124
; If you want to run this portion on a different computer, then replace
; the "localhost with the name of the other computer.
SHOW NETCONNECTON "localhost 5124 [PRINT [Ok to Send Again]] []
true

WAIT 100 ; Wait a little to establish the connection
Ok to Send Again
Ok to Send Again
Ok to Send Again

SHOW NETCONNECTSENDVALUE [Hello thanks for taking my call] ; Send some data
true

WAIT 100 ; Wait a little before we shut things down
Hello thanks for taking my call

NETCONNECTOFF
NETACCEPTOFF
NETSHUTDOWN


SourceForge.net Logo