ms_tcp.h

来自「1. 8623L平台」· C头文件 代码 · 共 50 行

H
50
字号
/* * * Copyright (c) Sigma Designs, Inc. 2005. All rights reserved. * */#ifndef __MS_TCP_H__#define __MS_TCP_H__#include "rmdef/rmdef.h"struct ms_tcp_socket_s;typedef struct ms_tcp_socket_s ms_tcp_socket_t;/* * Create a new TCP socket, ready for sending data to url * * @param url- http url http://host:port/xxx * @return a valid ms_tcp_socket_t, or NULL on error */ms_tcp_socket_t * open_ms_tcp_socket(RMascii *url);/* * Close a TCP connection, and free associated resources *  * @param ms_socket - the socket to close */void close_ms_tcp_socket(ms_tcp_socket_t *ms_socket);/* * Send data on a TCP socket and wait for an anser for a given time. * This function is not reentrant, the answer should not be freed and * a subsequent call to ms_tcp_send_receive will modify it. * * @param ms_socket - ms_socket to use * @param message * @param message_size  * @param answer - answer received * @param answer_size - size of the answer * @param delay_s - global delay (s) * @return RM_OK on success, RM_ERROR if no message received in the given delay */RMstatus ms_tcp_send_receive(		ms_tcp_socket_t *ms_socket, 		RMuint8 *message, RMuint32 message_size,		RMuint8 **answer, RMuint32 *answer_size, 		RMuint32 delay_s);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?