Main Menu

KB#00848-Establishing Socket Connections


Establishing Socket Connections


Step by step instructions to get sockets communicating in (v)pro5. This goes along with the examples in the Socket Overview documentation, but includes a few more things. 

0. Add the following alias line to the config.bbx file. 
        alias N0 tcp "" nodelay 
1. Open one session of Vpro/5. 
2. Start a server session. 
        >open (2,MODE="port=12000")"N0" 
3. From a DOS prompt, type: 
        c:\> netstat -a |more 
        (This will show the server started on port 12000 and it should say it's "listening".) 
4. Open a second session of VPRO/5. 
5. Start a client session. 
        >open (1,MODE="host=localhost,port=12000")"N0" 
6. From client session: 
        >write(1) "socket test" 
7. From server session: 
        >read (2)a$ 
        socket test (value of a$) 
8. From Client session: 
        >input "enter something: ",i$ 
        enter something: another socket test 
        >let i$=i$+$0D0A$;write record(1)i$ 
9. From Server session: 
        >print a$ 
        another socket test 

Last Modified: 02/23/2004 Product: PRO/5 Operating System: N/A

BASIS structures five components of their technology into the BBx Generations.

View BASIS LinkedIN Profile Visit our Twitter Feed Check out our Facebook Public Profile Click to View the BASIS youTube channel