void RiCOSConnectionPort_cleanup(
RiCOSConnectionPort * const me)
{
if (me==NULL) return;
RiCOSSocket_cleanup(&me->m_Socket);
/* Assumes you will have only one connection port
so the data for m_Buf can be freed; if it is not
the case, the readFromSockLoop will allocate it. */
if (me->m_Buf) {
free(me->m_Buf);
}
me->m_BufSize = 0;
}