Home
last modified time | relevance | path

Searched refs:xSockId (Results 1 – 4 of 4) sorted by relevance

/hal_espressif-3.6.0/components/freemodbus/tcp_master/port/
Dport_tcp_master.c232 if (pxInfo->xSockId == -1) { in xMBTCPPortMasterCloseConnection()
233 ESP_LOGE(TAG, "Wrong socket info or disconnected socket: %d, skip.", pxInfo->xSockId); in xMBTCPPortMasterCloseConnection()
236 if (shutdown(pxInfo->xSockId, SHUT_RDWR) == -1) { in xMBTCPPortMasterCloseConnection()
237 ESP_LOGV(TAG, "Shutdown failed sock %d, errno=%d", pxInfo->xSockId, errno); in xMBTCPPortMasterCloseConnection()
239 close(pxInfo->xSockId); in xMBTCPPortMasterCloseConnection()
240 pxInfo->xSockId = -1; in xMBTCPPortMasterCloseConnection()
289 …MB_PORT_CHECK((pxInfo && pxInfo->xSockId > -1), -1, "Try to read incorrect socket = #%d.", pxInfo-… in xMBTCPPortMasterGetBuf()
295 xLength = recv(pxInfo->xSockId, pucBuf, usBytesLeft, MSG_DONTWAIT); in xMBTCPPortMasterGetBuf()
303 pxInfo->xSockId, pxInfo->pcIpAddr); in xMBTCPPortMasterGetBuf()
308 pxInfo->xSockId, pxInfo->pcIpAddr, xLength, errno); in xMBTCPPortMasterGetBuf()
[all …]
Dport_tcp_master.h66 int xSockId; /*!< Socket ID of slave */ member
/hal_espressif-3.6.0/components/freemodbus/tcp_slave/port/
Dport_tcp_slave.c187 int xSockId = -1; in xMBTCPPortAcceptConnection() local
192 xSockId = accept(xListenSockId, (struct sockaddr *)&xSrcAddr, &xSize); in xMBTCPPortAcceptConnection()
193 if (xSockId < 0) { in xMBTCPPortAcceptConnection()
195 close(xSockId); in xMBTCPPortAcceptConnection()
206 ESP_LOGI(TAG, "Socket (#%d), accept client connection from address: %s", xSockId, cAddrStr); in xMBTCPPortAcceptConnection()
214 return xSockId; in xMBTCPPortAcceptConnection()
221 if (pxInfo->xSockId == -1) { in xMBTCPPortCloseConnection()
222 ESP_LOGE(TAG, "Wrong socket info or disconnected socket: %d.", pxInfo->xSockId); in xMBTCPPortCloseConnection()
225 if (shutdown(pxInfo->xSockId, SHUT_RDWR) == -1) { in xMBTCPPortCloseConnection()
226 ESP_LOGE(TAG, "Socket (#%d), shutdown failed: errno %d", pxInfo->xSockId, errno); in xMBTCPPortCloseConnection()
[all …]
Dport_tcp_slave.h66 int xSockId; /*!< Socket id */ member