L Scripting language development time get server and client

Source: Internet
Author: User

#scp
#这是一个TCP时间获取服务器的例子
#它不断监听一个网络连接
#如果有网络连接到来
#就通过新建立的网络连接发送当前时间

Definition: String, string2, ""
Definition: Address, addr2,127.0.0.1,13
Definition: integer, number of bytes, 0
Definition: Network connection, CONN2,TCP

Definition: function, routine
Start: function, routine
Listening: CONN2,ADDR2
Definition: Time, time1
READ: Current time, time1
Conversion: STRING2,TIME1
Fetch size: String, string2, number of bytes
If: Number of bytes >0, display: string2
If: Number of bytes >0, send: Conn2,string2
End: function, routine

When: 1, call: function, routine

#-------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------



#scp
#这是一个通过TCP协议向服务器请求当前时间的例子
#它先发起对一个网络上的服务器的连接
#如果连接建立, the time it takes to receive the server and display
#这个过程重复100次

Definition: String, string2,
Definition: Address, addr1,127.0.0.1,13

Definition: integer, number of bytes, 0
Definitions: integers, count,100
Definition: Network connection, CONN1,TCP
Connection: CONN1,ADDR1
Definition: function, function1
Start: function, function1

Receive: Conn1,string2

Fetch size: String, string2, number of bytes

If: Number of bytes >0, display: string2

Calculation: Formula, exp1,count=count-1

Sleeps: 100

End: function, function1


When: count>0, call: function, function1

L Scripting language development time get server and client

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.