Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
I implemented a simple TCP Client application using the TCPClient() ST function based on Halcon project(attached). It works fine with smaller packets of data but if I try to send messages larger than 56KB it stops working properly. Any idea what it can be?
To me I need to increase the size of the TCP buffer but not sure how it should be done?
I saw in your program you do a single TCPRead. If the complete message isn't received in the hardware buffer yet, you have to repeat it until the NULL characters is received.
Hope this helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Codesys Community,
I implemented a simple TCP Client application using the TCPClient() ST function based on Halcon project(attached). It works fine with smaller packets of data but if I try to send messages larger than 56KB it stops working properly. Any idea what it can be?
To me I need to increase the size of the TCP buffer but not sure how it should be done?
Regards,
Sina
Hello Sina,
I also had to check for a possible solution but at another website I found something which might be helpfull in getting your problem solved:
https://stackoverflow.com/questions/2533988/how-much-buffer-does-networkstream-and-tcpclient-have
I saw in your program you do a single TCPRead. If the complete message isn't received in the hardware buffer yet, you have to repeat it until the NULL characters is received.
Hope this helps.