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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -