Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuple with '/r' as new line character #28

Open
reconer opened this issue Feb 24, 2016 · 7 comments
Open

Tuple with '/r' as new line character #28

reconer opened this issue Feb 24, 2016 · 7 comments

Comments

@reconer
Copy link

reconer commented Feb 24, 2016

I am running the TCPServerDuplex (non-blob) example and I realize it cannot handle '\r' as new line. It only recognizes '\n'.

As a result, the tuple data is not being fed downstream from TCPServer. It would be great if you can add support for such cases or better, a user defined end of message character.

Thanks!

@leongor
Copy link
Contributor

leongor commented Feb 29, 2016

Can you give more details, please?
Do you send a message from external TCP client to TCPServer operator?
Does the messages end with '\r' without '\n' after it?

@reconer
Copy link
Author

reconer commented Mar 3, 2016

Yes thats right. its a tcp text stream whose end of line is a sentence with a '/r' at the end. it does not have the '/n' after it.

@chanskw
Copy link
Collaborator

chanskw commented Mar 10, 2016

@leongor Couple of questions:

  1. I think we hard-code "\n" as the line delimiter for a block of string. Is this true?
  2. Is it possible to add a parameter to specify a message delimiter for TCPServer operator? For example, what if I don't want "\n" or "\r", but I want us to look at a different delimiter?
  3. In the case of blob, can we also have a customizable delimiter to break up the input?

Thanks!

@leongor
Copy link
Contributor

leongor commented Mar 10, 2016

@chanskw @reconer

  1. Yes, as a usual standard in TCP transmission.
  2. Adding '\r' to be additional default line delimiter is quite easy. To have a parameter for a custom one (maybe even some regex) is more complicated, but also possible.
  3. Not sure if it is wise to mix blocksize vs delimiter, but technically it's the same.

@chanskw
Copy link
Collaborator

chanskw commented Mar 10, 2016

@leongor can you show me where to look to override the default? I can see if I can add a parameter. Just want to try this and figure out what we need.

@leongor
Copy link
Contributor

leongor commented Mar 10, 2016

@chanskw here: data_item.cpp
Look at function DataItem::addData()

@leongor
Copy link
Contributor

leongor commented Apr 4, 2016

@chanskw Did you have a chance to look at it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants