VirtualBox

source: vbox/trunk/src/libs/curl-7.87.0/include/curl/websockets.h@ 98341

最後變更 在這個檔案從98341是 98339,由 vboxsync 提交於 2 年 前

curl-7.87.0: EOL style fixing, bit more irrelevant export fixing

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.6 KB
 
1#ifndef CURLINC_WEBSOCKETS_H
2#define CURLINC_WEBSOCKETS_H
3/***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
10 * Copyright (C) 1998 - 2022, Daniel Stenberg, <[email protected]>, et al.
11 *
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at https://curl.se/docs/copyright.html.
15 *
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 * SPDX-License-Identifier: curl
24 *
25 ***************************************************************************/
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31struct curl_ws_frame {
32 int age; /* zero */
33 int flags; /* See the CURLWS_* defines */
34 curl_off_t offset; /* the offset of this data into the frame */
35 curl_off_t bytesleft; /* number of pending bytes left of the payload */
36};
37
38/* flag bits */
39#define CURLWS_TEXT (1<<0)
40#define CURLWS_BINARY (1<<1)
41#define CURLWS_CONT (1<<2)
42#define CURLWS_CLOSE (1<<3)
43#define CURLWS_PING (1<<4)
44#define CURLWS_OFFSET (1<<5)
45
46/*
47 * NAME curl_ws_recv()
48 *
49 * DESCRIPTION
50 *
51 * Receives data from the websocket connection. Use after successful
52 * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
53 */
54CURL_EXTERN CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
55 size_t *recv,
56 struct curl_ws_frame **metap);
57
58/* sendflags for curl_ws_send() */
59#define CURLWS_PONG (1<<6)
60
61/*
62 * NAME curl_easy_send()
63 *
64 * DESCRIPTION
65 *
66 * Sends data over the websocket connection. Use after successful
67 * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
68 */
69CURL_EXTERN CURLcode curl_ws_send(CURL *curl, const void *buffer,
70 size_t buflen, size_t *sent,
71 curl_off_t framesize,
72 unsigned int sendflags);
73
74/* bits for the CURLOPT_WS_OPTIONS bitmask: */
75#define CURLWS_RAW_MODE (1<<0)
76
77CURL_EXTERN struct curl_ws_frame *curl_ws_meta(CURL *curl);
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* CURLINC_WEBSOCKETS_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette