cancel
Showing results for 
Search instead for 
Did you mean: 

PCO Socket Connection- read message by length

Former Member
0 Kudos

Hi Folks,

This is regarding the Pco Socket connection in MII. While configuring the socket we need to specify either Terminator character or message length. I have specified the terminator character (\n) but client is having a concern that this character can appear in between of messages. They are asking to use length to read the message. As you can see in the attached screen shot I have configured 2 ports (there are many ports). In case I want to specify the length to read the message I think all the messages from that port need to respect that length. In our scenario we have many messages from one port number with different length. What configuration I have to do in order to read different messages with different length from a port number.

Thanks

Shaji

pcoss.png

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Christian,

Thanks for your quick response.

As per my knowledge if we specify a particular message length (for Example 1000) Pco will read only those messages which are coming with length 1000. I mean to say if there is a message with length as 999 or 1001 I think Pco will not read it. In this case I can't push the message to Queue or DB as you mentioned.

Please correct me if I am wrong

Thanks

Shaji

former_member185280
Active Contributor
0 Kudos

It really depends on what your messages look like but in the past I have dealt with this by buffering partial message chunks pushed by PCo in a Queue or db on the MII side. You just need to be able to discern when you have a complete message in your buffer with MII logic.

Regards,
Christian