Changeset 109 in libcf for trunk/src/cf_socket.c


Ignore:
Timestamp:
06/04/13 14:25:10 (11 years ago)
Author:
cheese
Message:

#1 add typical data structure algorithms (linked-list / queue / stak) and rename symbol for context of each modules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_socket.c

    r104 r109  
    510510 */
    511511int
    512 CF_Socket_Send (const int   sock,
    513                 const void  * buf,
    514                 const int   len)
     512CF_Socket_Send (const int       sock,
     513                const void      * buf,
     514                const size_t    len)
    515515{
    516516    return CF_Socket_SendTimeout (sock, buf, len, CF_SOCKET_NO_TIMEOUT);
     
    532532CF_Socket_SendTimeout (const int    sock,
    533533                       const void   * buf,
    534                        const int    len,
     534                       const size_t len,
    535535                       const int    timeout)
    536536{
     
    539539    ASSERT_SOCKET (sock);
    540540
    541     result = (int) send (sock, buf, (size_t) len, 0);
     541    result = (int) send (sock, buf, len, 0);
    542542    if (result != len)
    543543        return CF_ERROR_SOCKET_SEND;
     
    556556 */
    557557int
    558 CF_Socket_Recv (const int   sock,
    559                 void        * buf,
    560                 const int   len)
     558CF_Socket_Recv (const int       sock,
     559                void            * buf,
     560                const size_t    len)
    561561{
    562562    return CF_Socket_RecvTimeout (sock, buf, len, CF_SOCKET_NO_TIMEOUT);
     
    578578CF_Socket_RecvTimeout (const int    sock,
    579579                       void         * buf,
    580                        const int    len,
     580                       const size_t len,
    581581                       const int    timeout)
    582582{
     
    589589        return result;
    590590
    591     result = (int) recv (sock, buf, (size_t) len, 0);
     591    result = (int) recv (sock, buf, len, 0);
    592592    if (result < 0)
    593593        return CF_ERROR_SOCKET_RECV;
Note: See TracChangeset for help on using the changeset viewer.