Socket splitting data
Posted: Tue Dec 13, 2022 10:10 pm
Hello everyone,
I'm currently trying to build an App that connects to a 3rd party software which provides some data in json format. Then I translate the json data to xml and send them via socket to a socket server I built based on the chat server/client sample stack in order to broadcast the XML array to multiple clients that are connected to chat server. But the server broadcasts the whole xml data in 2 messages instead of one, this way I don't know when all the data have been received on the client in order to start manipulating them and clear buffer to wait for the next message(updated xml data).
When I receive the data in json format I run a .bat file that translates them to xml and stores it in a file in order to read them elsewhere.
The reason I can't share the folder of the file with the clients is that some of them may be over internet, so on the chat server I can port forward and have all clients connect to it and receive the messages, plus I want the lower possible delay.
Any idea why my socket message is being split? Is there a size limit that can be increased ?
Thanks in advance.
I'm currently trying to build an App that connects to a 3rd party software which provides some data in json format. Then I translate the json data to xml and send them via socket to a socket server I built based on the chat server/client sample stack in order to broadcast the XML array to multiple clients that are connected to chat server. But the server broadcasts the whole xml data in 2 messages instead of one, this way I don't know when all the data have been received on the client in order to start manipulating them and clear buffer to wait for the next message(updated xml data).
When I receive the data in json format I run a .bat file that translates them to xml and stores it in a file in order to read them elsewhere.
The reason I can't share the folder of the file with the clients is that some of them may be over internet, so on the chat server I can port forward and have all clients connect to it and receive the messages, plus I want the lower possible delay.
Any idea why my socket message is being split? Is there a size limit that can be increased ?
Thanks in advance.