简体   繁体   中英

how to programmatically reject new connections on 4d v17?

是否有类似于WEB STOP SERVERSTOP SQL SERVER的命令,但是拒绝4d服务器上的新连接?

i found out that by using the On Server Open Connection Database Method , i can reject new connections by returning a value different than 0 as seen in the doc

If you do not return a value in $0, thereby leaving the variable undefined or initialized to zero, 4D Server assumes that the database method accepts the connection. If you do not accept the connection, you return a non-null value in $0.

so i just change the return value $0 under the conditions i need

If(*some conditions*)
  $0:1
End If

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM