亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? socklib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
    if (iosFdValue (s) ==  ERROR || name == NULL)        return (ERROR);    pSockFunc = pSockFdMap[s];    if ((pSockFunc == NULL) || (pSockFunc->bindRtn == NULL))	{        netErrnoSet (ENOTSUP);	return (ERROR);	}    return ((pSockFunc->bindRtn) (s, name, namelen));    }/********************************************************************************* listen - enable connections to a socket** This routine enables connections to a socket.  It also specifies the* maximum number of unaccepted connections that can be pending at one time* (<backlog>).  After enabling connections with listen(), connections are* actually accepted by accept().** RETURNS: OK, or ERROR if the socket is invalid or unable to listen.*/STATUS listen    (    int s,              /* socket descriptor */    int backlog         /* number of connections to queue */    )    {    SOCK_FUNC *	pSockFunc = NULL;       if (iosFdValue (s) ==  ERROR)        return ERROR;    pSockFunc = pSockFdMap[s];    if (pSockFunc == NULL || pSockFunc->listenRtn == NULL)	{        netErrnoSet (ENOTSUP);	return (ERROR);	}    return ((pSockFunc->listenRtn) (s, backlog));    }/********************************************************************************* accept - accept a connection from a socket** This routine accepts a connection on a socket, and returns a new socket* created for the connection.  The socket must be bound to an address with* bind(), and enabled for connections by a call to listen().  The accept()* routine dequeues the first connection and creates a new socket with the* same properties as <s>.  It blocks the caller until a connection is* present, unless the socket is marked as non-blocking.** The <addrlen> parameter should be initialized to the size of the available* buffer pointed to by <addr>.  Upon return, <addrlen> contains the size in* bytes of the peer's address stored in <addr>.** WARNING* You must make sure that you do not close the file descriptor on which * a task is pending during an accept(). Although the accept() on the * closed file descriptor sometimes returns with an error, the accept() * can also fail to return at all. Thus, if you need to be able to close * a socket connections file descriptor asynchronously, you may need to * set up a semaphore-based locking mechanism that prevents the close * while an accept() is pending on the file descriptor.** RETURNS* A socket descriptor, or ERROR if the call fails.*/int accept    (    int s,                      /* socket descriptor */    struct sockaddr *addr,      /* peer address */    int *addrlen                /* peer address length */    )    {    int		newFd;        SOCK_FUNC *	pSockFunc = NULL;    if (iosFdValue (s) ==  ERROR)        {        netErrnoSet (EINVAL);        return (ERROR);        }    pSockFunc = pSockFdMap[s];    if ((pSockFunc == NULL) || (pSockFunc->acceptRtn == NULL))	{        netErrnoSet (ENOTSUP);	return (ERROR);	}    if ((newFd = (pSockFunc->acceptRtn) (s, addr, addrlen)) == ERROR)	return (ERROR);    pSockFdMap[newFd] = pSockFunc;		/* stuff fd map array */    return (newFd);    }/********************************************************************************* connect - initiate a connection to a socket** If <s> is a socket of type SOCK_STREAM, this routine establishes a virtual* circuit between <s> and another socket specified by <name>.  If <s> is of* type SOCK_DGRAM, it permanently specifies the peer to which messages* are sent.  If <s> is of type SOCK_RAW, it specifies the raw socket upon* which data is to be sent and received.  The <name> parameter specifies the* address of the other socket.** NOTE: If a socket with type SOCK_STREAM is marked non-blocking, this* routine will return ERROR with an error number of EINPROGRESS or EALREADY* if a connection attempt is pending. A later call will return ERROR and set* the error number to EISCONN once the connection is established. The* connection attempt must be repeated until that result occurs or until* this routine establishes a connection immediately and returns OK.** RETURNS: OK, or ERROR if the connection attempt does not complete.*/STATUS connect    (    int s,                      /* socket descriptor */    struct sockaddr *name,      /* addr of socket to connect */    int namelen                 /* length of name, in bytes */    )    {    SOCK_FUNC *	pSockFunc = NULL;    if (name == NULL)        {        netErrnoSet (EINVAL);        return (ERROR);        }        if (iosFdValue (s) ==  ERROR)        return (ERROR);    pSockFunc = pSockFdMap[s];    if ((pSockFunc == NULL) || (pSockFunc->connectRtn == NULL))	{        netErrnoSet (ENOTSUP);	return (ERROR);	}    return ((pSockFunc->connectRtn) (s, name, namelen));    }/******************************************************************************** connectWithTimeout - attempt socket connection within a specified duration** Use this routine as an alternative to connect() when your application* requires a shorter time out on a connection attempt.  By design, a TCP* connection attempt times out after 75 seconds if unsuccessful.  Thus, a * blocking TCP socket connect() call might not return for 75 seconds.  A * connectWithTimeout() call lets you reduce this time out by scheduling an * abort of the connection attempt if it is not successful before <timeVal>.* However, connectWithTimeout() does not actually change the TCP timeout* value.  Thus, you cannot use connectWithTimeout() to lengthen the* connection time out beyond the TCP default.** In all respects other than the time out value, a connectWithTimeout() call * behaves exactly like connect(). Thus, if no application is listening for * connections at the other end, connectWithTimeout() returns immediately just * like connect().  If you specify a NULL pointer for <timeVal>, * connectWithTimeout() behaves exactly like a connect() call.** RETURNS: OK, or ERROR if a new connection is not established before timeout.** SEE ALSO: connect()*/STATUS connectWithTimeout    (    int                 sock,           /* socket descriptor */    struct sockaddr     *adrs,          /* addr of the socket to connect */    int                 adrsLen,        /* length of the socket, in bytes */    struct timeval      *timeVal        /* time-out value */    )    {    SOCK_FUNC *	pSockFunc = NULL;    if (adrs == NULL)        {        netErrnoSet (EINVAL);        return (ERROR);        }        if (iosFdValue (sock) ==  ERROR)        return (ERROR);    pSockFunc = pSockFdMap[sock];    if ((pSockFunc == NULL) || (pSockFunc->connectWithTimeoutRtn == NULL))	{        netErrnoSet (ENOTSUP);	return (ERROR);	}    return ((pSockFunc->connectWithTimeoutRtn) (sock, adrs,	adrsLen, timeVal));    }/********************************************************************************* sendto - send a message to a socket** This routine sends a message to the datagram socket named by <to>.  The* socket <s> is received by the receiver as the sending socket.** The maximum length of <buf> is subject to the limits on UDP buffer* size. See the discussion of SO_SNDBUF in the setsockopt() manual* entry.** You can OR the following values into the <flags> parameter with this* operation:** .IP "MSG_OOB (0x1)" 26* Out-of-band data.** .IP "MSG_DONTROUTE (0x4)"* Send without using routing tables.* .LP** RETURNS* The number of bytes sent, or ERROR if the call fails.** SEE ALSO* setsockopt()*/int sendto    (    FAST int             s,             /* socket to send data to */    FAST caddr_t         buf,           /* pointer to data buffer */    FAST int             bufLen,        /* length of buffer */    FAST int             flags,         /* flags to underlying protocols */    FAST struct sockaddr *to,           /* recipient's address */    FAST int             tolen          /* length of <to> sockaddr */    )    {    SOCK_FUNC *	pSockFunc = NULL;    if (buf == NULL || to == NULL)        {        netErrnoSet (EINVAL);        return (ERROR);        }    if (iosFdValue (s) ==  ERROR)        return (ERROR);    pSockFunc = pSockFdMap[s];        if ((pSockFunc == NULL) || (pSockFunc->sendtoRtn == NULL))	{        netErrnoSet (ENOTSUP);	return (ERROR);	}    return ((pSockFunc->sendtoRtn) (s, buf, bufLen, flags, to,	tolen));    }/********************************************************************************* send - send data to a socket** This routine transmits data to a previously established connection-based* (stream) socket.** The maximum length of <buf> is subject to the limits* on TCP buffer size; see the discussion of SO_SNDBUF in the* setsockopt() manual entry.** You may OR the following values into the <flags> parameter with this* operation:** .IP "MSG_OOB (0x1)" 26* Out-of-band data.** .IP "MSG_DONTROUTE (0x4)"* Send without using routing tables.* .LP** RETURNS* The number of bytes sent, or ERROR if the call fails.** SEE ALSO* setsockopt(), sendmsg()**/int send    (    FAST int            s,              /* socket to send to */    FAST const char *   buf,            /* pointer to buffer to transmit */    FAST int            bufLen,         /* length of buffer */    FAST int            flags           /* flags to underlying protocols */    )    {    SOCK_FUNC *	pSockFunc = NULL;    if (buf == NULL || iosFdValue (s) ==  ERROR)        return (ERROR);    pSockFunc = pSockFdMap[s];    if ((pSockFunc == NULL) || (pSockFunc->sendRtn == NULL))	{        netErrnoSet (ENOTSUP);	return (ERROR);	}    return ((pSockFunc->sendRtn) (s, buf, bufLen, flags));    }/********************************************************************************* sendmsg - send a message to a socket** This routine sends a message to a datagram socket.  It may be used in* place of sendto() to decrease the overhead of reconstructing the* message-header structure (`msghdr') for each message.** For BSD 4.4 sockets a copy of the <mp>->msg_iov array will be made.  This* requires a cluster from the network stack system pool of size * <mp>->msg_iovlen * sizeof (struct iovec) or 8 bytes.** RETURNS* The number of bytes sent, or ERROR if the call fails.** SEE ALSO* sendto()*/int sendmsg    (    int                 sd,     /* socket to send to */    struct msghdr       *mp,    /* scatter-gather message header */    int                 flags   /* flags to underlying protocols */    )    {    SOCK_FUNC *	pSockFunc = NULL;    if (mp == NULL || iosFdValue (sd) ==  ERROR)	{        netErrnoSet (EINVAL);        return (ERROR);	}    pSockFunc = pSockFdMap[sd];    if ((pSockFunc == NULL) || (pSockFunc->sendmsgRtn == NULL))	{        netErrnoSet (ENOTSUP);	return (ERROR);	}    return ((pSockFunc->sendmsgRtn) (sd, mp, flags));    }/********************************************************************************* recvfrom - receive a message from a socket** This routine receives a message from a datagram socket regardless of* whether it is connected.  If <from> is non-zero, the address of the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区有码在线| 欧美日免费三级在线| 久久久午夜电影| 国产一区二区在线观看视频| 欧美成人a在线| 激情另类小说区图片区视频区| 久久综合色一综合色88| 国产精品自产自拍| 国产精品超碰97尤物18| 91久久精品国产91性色tv| 亚洲成人免费视频| 精品日韩欧美在线| 国产91丝袜在线播放| 亚洲激情男女视频| 欧美一区二区三区四区高清| 国产呦精品一区二区三区网站| 欧美国产激情二区三区 | 久久久91精品国产一区二区精品| 国产精品一二三四五| 亚洲免费伊人电影| 欧美一级片免费看| 成人网男人的天堂| 亚洲国产视频a| 欧美精品一区二区三区蜜桃| 95精品视频在线| 日韩精品久久久久久| 久久久精品天堂| 在线观看成人小视频| 麻豆成人久久精品二区三区红| 国产免费观看久久| 欧美精品久久久久久久久老牛影院| 精品一区二区免费视频| 亚洲女同一区二区| 日韩精品中文字幕一区| av一区二区三区黑人| 日韩经典一区二区| 亚洲视频在线一区二区| 日韩欧美在线网站| 色婷婷亚洲精品| 国产精品资源站在线| 天天综合天天综合色| 国产女人18毛片水真多成人如厕| 欧美性大战xxxxx久久久| 国产麻豆精品theporn| 午夜av区久久| **网站欧美大片在线观看| 日韩视频免费观看高清完整版| 成人av免费在线| 久久国产尿小便嘘嘘| 亚洲精品成a人| 国产女同性恋一区二区| 精品欧美乱码久久久久久| 色老综合老女人久久久| 国产一区二区三区黄视频| 亚洲无人区一区| 亚洲天堂av一区| 国产精品美女久久久久av爽李琼| 精品伦理精品一区| 欧美一区二区三区色| 欧美色电影在线| 色婷婷激情久久| kk眼镜猥琐国模调教系列一区二区| 精品午夜久久福利影院| 日日欢夜夜爽一区| 亚洲午夜精品在线| 亚洲最新在线观看| 亚洲欧洲av色图| 中文字幕在线视频一区| 国产欧美日韩三区| 国产欧美精品一区aⅴ影院| www欧美成人18+| 欧美精品一区二区在线播放| 日韩欧美不卡一区| 日韩欧美亚洲国产精品字幕久久久| 欧美美女bb生活片| 欧美亚洲国产bt| 欧美伊人久久久久久久久影院| 97国产精品videossex| 91在线国产观看| 99re66热这里只有精品3直播 | 国产精品一级在线| 国产精品自拍在线| 岛国精品在线播放| 粉嫩一区二区三区性色av| 国产iv一区二区三区| 国产成人综合视频| www.欧美精品一二区| 91婷婷韩国欧美一区二区| 91免费看`日韩一区二区| 色综合欧美在线视频区| 欧美色综合网站| 制服丝袜成人动漫| 精品国产亚洲在线| 国产精品你懂的在线| 亚洲视频小说图片| 亚洲国产成人91porn| 日日夜夜免费精品| 黄色日韩三级电影| 成人国产在线观看| 欧洲av在线精品| 欧美一区二区三区婷婷月色 | 欧美日韩色一区| 91精品国产乱| 国产午夜精品一区二区| 国产精品免费久久| 亚洲国产日韩精品| 麻豆视频观看网址久久| 国产·精品毛片| 欧美午夜在线一二页| 91精品国产综合久久蜜臀 | 欧美男同性恋视频网站| 精品福利视频一区二区三区| 国产精品国产三级国产普通话99| 亚洲黄色小视频| 麻豆91精品视频| 成人av在线一区二区三区| 欧美在线综合视频| 欧美videossexotv100| 中文字幕色av一区二区三区| 婷婷亚洲久悠悠色悠在线播放| 国产乱码精品一区二区三| 色综合色综合色综合色综合色综合| 欧美一区二区成人| 国产精品久久久久婷婷二区次| 午夜影院久久久| 国产成都精品91一区二区三| 欧美日韩中字一区| 国产亚洲精品资源在线26u| 亚洲一级二级在线| 国产精品亚洲第一区在线暖暖韩国 | 成人免费视频一区| 欧美精品乱码久久久久久按摩| 亚洲国产成人自拍| 久久精品999| 在线亚洲一区观看| 国产日本欧洲亚洲| 日本不卡一区二区| 99国产麻豆精品| 26uuu亚洲综合色欧美| 亚洲一本大道在线| 99国产精品久久久久久久久久久| 日韩午夜在线播放| 亚洲一卡二卡三卡四卡无卡久久 | 久久国产成人午夜av影院| 一本色道a无线码一区v| 国产日韩欧美在线一区| 美女网站一区二区| 欧美亚洲综合在线| 综合激情成人伊人| 国产盗摄精品一区二区三区在线 | 色综合久久久久| 欧美高清在线精品一区| 久久成人免费日本黄色| 欧美精品丝袜中出| 一卡二卡欧美日韩| 91在线国内视频| 成人欧美一区二区三区在线播放| 国产精品123| 久久久夜色精品亚洲| 久久99精品久久久久| 欧美一区二区三区四区在线观看| 午夜精品aaa| 欧美日韩在线播放三区| 亚洲一二三级电影| 欧美三级资源在线| 夜色激情一区二区| 欧美视频你懂的| 亚洲不卡av一区二区三区| 欧美性生活影院| 亚洲国产成人av| 欧美日本在线播放| 日韩精品亚洲专区| 7777精品伊人久久久大香线蕉最新版| 一区二区三区四区亚洲| 日本韩国视频一区二区| 亚洲蜜臀av乱码久久精品蜜桃| 91亚洲精品久久久蜜桃| 亚洲精品久久7777| 欧美视频在线一区二区三区| 亚洲第一激情av| 555www色欧美视频| 久久黄色级2电影| 2021中文字幕一区亚洲| 国产suv一区二区三区88区| 国产精品初高中害羞小美女文| 菠萝蜜视频在线观看一区| 亚洲美女偷拍久久| 欧美性三三影院| 久88久久88久久久| 国产精品高清亚洲| 欧美亚洲国产一区二区三区va| 日韩国产欧美视频| 久久久久久免费| av电影在线观看一区| 一区二区三区产品免费精品久久75| 欧美三级欧美一级| 精品一区二区在线播放| 中文字幕一区二区三区蜜月 | 有码一区二区三区| 欧美久久久一区|