Hai
i am using file server as reference ... to tcp/ip transmit and receive data to the GUI here is function after TCP/IP socket accept....
int main_loop(void)
{
unsigned char *ImageDataPointer;
unsigned int tx_frame_cnt = 1;
while(1) {
ImageDataPointer = (unsigned char *)write_frame();
if(NULL == ImageDataPointer)
{
printf("Error Transmiting data NULL\n");
return -1;
}
printf(" transmited Frame No: %d\n", tx_frame_cnt);
tx_frame_cnt++;
}
return -1;
}
void * write_frame(void)
{
int s32NoOfBytes = 0;
unsigned int u32BufferSize;
int s32transmitedData;
static unsigned char *ptr_u8BufferData = NULL;
/* Buffer size to write to socket */
u32BufferSize = 1024;
s32transmitedData = 0;
ptr_u8BufferData = 0x1; //&ImageData[0];
do {
if((s32NoOfBytes = send(g_Socket_fd, ptr_u8BufferData, (u32BufferSize - s32ReceivedData), MSG_WAITALL
)) < 0)
{
printf("Failed to transmit data bytes to client\n");
break;
}
ptr_u8BufferData += s32NoOfBytes;
s32tranmitedData += s32NoOfBytes;
} while((s32transmitedData < u32BufferSize - 1) && (s32NoOfBytes > 0));
printf("transmited %d bytes\n", s32transmitedData);
return ImageData;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
console is printing like "Failed to transmit data bytes to client"
"send(g_Socket_fd, ptr_u8BufferData, (u32BufferSize - s32ReceivedData), MSG_WAITALL)) < 0)"
Assertion "netconn_accept: invalid recvmbox" failed at line 354 in C:\Hudson\workspace\lwIP 1.0.1\scripts\temp\SSL_temp_Sources_Checkout\sources\Blackfin\lib\lwip\src\api\api_lib.c
sys_mbox_valid(&conn->recvmbox),return Err.conn);
i am unable to find my mistake
anyone please guide Me...
Assertion "netconn_accept: invalid recvmbox" failed at line 354 in C:\Hudson\workspace\lwIP 1.0.1\scripts\temp\SSL_temp_Sources_Checkout\sources\Blackfin\lib\lwip\src\api\api_lib.c
[edited by: Hkrajubf at 1:21 PM (GMT -4) on 14 Jul 2022]