This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
component:internet:zh [2023/11/05 10:54] hfsr [TCP套接字对象] |
component:internet:zh [2023/11/05 10:56] (current) hfsr [HTTP请求对象] |
||
---|---|---|---|
Line 33: | Line 33: | ||
确认套接字已连接。若连接失败会报错。 | 确认套接字已连接。若连接失败会报错。 | ||
\\ | \\ | ||
- | - `id():string` | + | - `id():string` |
返回此套接字的ID。 | 返回此套接字的ID。 | ||
Line 40: | Line 40: | ||
- `read([n:number]):string` | - `read([n:number]):string` | ||
- | Tries to read data from the response. Returns the read byte array. | + | 尝试从响应中读取数据。返回读取到的字节数组。 |
+ | \\ | ||
- `response():number, string, table` | - `response():number, string, table` | ||
- | Get response code, message and headers. | + | 获取响应码、响应信息与响应头。 |
+ | \\ | ||
- `close()` | - `close()` | ||
- | Closes an open socket stream. | + | 关闭某个已打开的套接字流。 |
+ | \\ | ||
- `finishConnect():boolean` | - `finishConnect():boolean` | ||
- | Ensures a response is available. Errors if the connection failed. | + | 确认套接字已连接。若连接失败会报错。 |
目录 | 目录 |