NETCONNECTRECEIVEVALUE
Outputs the value of the last network data received on the connection that was created with NETCONNECTON. The output is a list, as if parsed by PARSE.
The network data is interpreted as characters encoded in the system default Windows code page of the host operating system. As a result, it may not be possible to receive data from an instance of FMSLogo that is running on an operating system which is configured for a different language than yours.
It is best to run this procedure from the receiveready
instruction list input of your NETCONNECTON instruction.
If you don't, then the data is discarded the next time receiveready
is run.
The following example sets up both a client and server. The server (accepter) sends data to the client (connector).
NETSTARTUP ; Start up the network ; Wait for someone to connect to you on port 5124 SHOW NETACCEPTON 5124 [PRINT [Ok to Send Again]] []
true Ok to Send Again; 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 NETCONNECTRECEIVEVALUE]
trueWAIT 100 ; Wait a little to establish the connection
Ok to Send Again Ok to Send AgainSHOW NETACCEPTSENDVALUE [Who are you that called me] ; Send some data
trueWAIT 100 ; Wait a little before we shut things down
Who are you that called meNETCONNECTOFF NETACCEPTOFF NETSHUTDOWN