⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ms_udp.h

📁 1. 8623L平台
💻 H
字号:
/* * * Copyright (c) Sigma Designs, Inc. 2005. All rights reserved. * */#ifndef __MS_UDP_H__#define __MS_UDP_H__#include "rmdef/rmdef.h"struct ms_udp_socket_s;typedef struct ms_udp_socket_s ms_udp_socket_t;/* * Create a new UDP socket, connected to address *address by default * * @param address - IP address of the MS server * @return a valid ms_udp_socket_t, or NULL on error */ms_udp_socket_t * open_ms_udp_socket(RMascii *address);/* * Close a UDP connection, and free associated resources *  * @param ms_socket - the socket to close */void close_ms_udp_socket(ms_udp_socket_t *ms_socket);/* * Send a UDP packet and wait for the anser for a given time. This function is * not reentrant, the answer should not be freed and a subsequent call to * ms_udp_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 small_dealy_ms - delay between attempts (ms) * @param big_delay_s - global delay (s) * @return RM_OK on success, RM_ERROR if no message received in the given delay */RMstatus ms_udp_send_receive(ms_udp_socket_t *ms_socket, 		             RMuint8 *message, RMuint32 message_size,                             RMuint8 **answer, RMuint32 *answer_size, 			     RMuint32 small_dealy_ms,			     RMuint32 big_delay_s);#endif

⌨️ 快捷键说明

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