librnr/sock.c
SimpleBuf_T *SocketBufNewBuf(Socket_T *pSocket, int eIOBuf, size_t nBufSize)
{
  CHKPTR(pSocket, NULL);
  SOCK_CHK_IO(eIOBuf, NULL);

  SimpleBufDelete(pSocket->m_pIOBuf[eIOBuf]);
  pSocket->m_pIOBuf[eIOBuf]  = SimpleBufNewWithBuf(nBufSize);
  return pSocket->m_pIOBuf[eIOBuf];
}
/*!
 * \brief Allocate a socket buffer and attach to Socket.
 *
 * \param pSocket   Pointer to Socket.
 * \param eIOBuf    One of: \ref SOCK_IO_READ \ref SOCK_IO_WRITE.
 * \param nBufSize  Buffer size (bytes).
 *
 * \return Returns pointer to newly allocated buffer. 
 */
\brief Allocate a socket buffer and attach to Socket.
\param pSocket   Pointer to Socket.

\return Returns pointer to newly allocated buffer.
\ brief Allocate a socket buffer and attach to Socket . \ param pSocket Pointer to Socket . \ return Returns pointer to newly allocated buffer .
SimpleBuf_T *SocketBufNewBuf(Socket_T *pSocket, int eIOBuf, size_t nBufSize)
{
  CHKPTR(pSocket, NULL);
  SOCK_CHK_IO(eIOBuf, NULL);
  SimpleBufDelete(pSocket->m_pIOBuf[eIOBuf]);
  pSocket->m_pIOBuf[eIOBuf]  = SimpleBufNewWithBuf(nBufSize);
  return pSocket->m_pIOBuf[eIOBuf];
}
SimpleBuf_T * SocketBufNewBuf ( Socket_T * pSocket , int eIOBuf , size_t nBufSize ) { CHKPTR ( pSocket , NULL ) ; SOCK_CHK_IO ( eIOBuf , NULL ) ; SimpleBufDelete ( pSocket -> m_pIOBuf [ eIOBuf ] ) ; pSocket -> m_pIOBuf [ eIOBuf ] = SimpleBufNewWithBuf ( nBufSize ) ; return pSocket -> m_pIOBuf [ eIOBuf ] ; }
\brief Allocate a socket buffer and attach to Socket.
\ brief Allocate a socket buffer and attach to Socket .