hannesrauhe / lunchinator

Tool to call colleagues for lunch
Other
1 stars 0 forks source link

Allow binary data to be sent as message #155

Open entropia1 opened 10 years ago

entropia1 commented 10 years ago

I would prefer not to deal with unicode objects when sending messages. I believe the unicode stuff is from my old changes, but I would like to change that again and let call() take str instead. Maybe we want to send binary data at some point (e.g., OTR). I already removed unicode from the socket wrapper.

hannesrauhe commented 10 years ago

That's ok. I was just copying without really understanding. ^^

If you don't have already: can you integrate some reliable check that throws an error or converts if possible?

entropia1 commented 10 years ago

I still think it would be better to use str instead of unicode but this would mean that we have to change the message processing basically everywhere. Most plugins just assume that msg is unicode. I will postpone this issue until we actually want to send binary data.

hannesrauhe commented 10 years ago

Somehow I missed this issue when creating the interface for the lunch_socket... However, maybe it makes sense to handle binary data in another way.

entropia1 commented 10 years ago

you mean an alternative to lunch_server.call()? Would be possible. Then we could just change the socket's internal representation to str. But we had to add the binary property to the extended messages flags.

hannesrauhe commented 10 years ago

I will change the protocol to "understand" binary :-)

hannesrauhe commented 10 years ago

Protocol and extMessage is extended, lunch_server etc need to adapt

hannesrauhe commented 10 years ago

Since this is not necessary for 0.4, I'm postponing...