cvi - Use of TCP in ATEASY -


i want create server side using ateasy- , inside ateasy tests ill send tests information labwindows\cvi implement client side.

my question is, has tutorial or example on how use tcp in ateasy server?

the winsock example ateasy examples isn't enough , hard understand.

never mind, found in ateasy documentation.

enter image description here

for example:

    ! create socket in tcp mode     asasocket = wscreate(awstcpip)      ! attach socket     wsbind(asasocket,"12345" ,"127.0.0.1")      ! set socket listen incoming connection client:     wslisten(asasocket)      ! attempts return readwrite socket remote client in twenty seconds.      ! in stage client should calling wsconnect()...     newsocket=wsaccept(asasocket,20000)       ! notice send ( , receive ) data new socket returned wsaccept     wssend(newsocket,300, ,"hello, how you?")      ! attempt receive data client     ! client should send message using wssend()...     while true     if wsreceive(newsocket, 1000, , smessage)>0         exitloop     endif      endwhile      ! print message client     print smessage      ! close connection     wsclose(newsocket)     wsclose(asasocket) 

each of above functions has return value , should checked.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -