andris9 / rai

Request-Answer-Interface
Other
16 stars 12 forks source link

more flexible EOF symbol #10

Open horpto opened 9 years ago

horpto commented 9 years ago

Some clients send \n symbol as EOF instead of \r\n pair (for example nc on linux). Due to this client sends data to the server but it doesn't respond to the client although saves data in this._remainder.

I suggests to allow for programmer specify which symbol(s) use as EOF and set it by default as \r\n. Also sometime services need assume 'soft EOF' i.e. or \r\n or \n or (maybe for macos users of service) \r.