소스 검색

Added callback function

Lammert Bies 8 년 전
부모
커밋
ab685743f0
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      docs/APIReference.md

+ 2 - 0
docs/APIReference.md

@@ -41,6 +41,8 @@ The structure `client_cert` is used asa sub-structure in the `mg_request_info` s
 | |*Deprecated. Use* `mg_set_websocket_handler()` *instead.*|
 |~~`websocket_data`~~|**`int websocket_data( struct mg_connection *conn, int bits, char *data, size_t data_len );`**|
 | |*Deprecated. Use* `mg_set_websocket_handler()` *instead.*|
+|**`connection_close`**|**`void connection_close( const struct mg_connection *conn );`**|
+| |The callback function `connection_close()` is called when CivetWeb is closing a connection. The per-context mutex is locked when the callback function is invoked. The function is primarly useful for noting when a websocket is closing and removing it from any application-maintained list of clients. *Using this callback for websocket connections is deprecated. Use* `mg_set_websocket_handler()` *instead.*|
 
 #### Description