简体   繁体   English

如何在不编码和解码的情况下在扭曲的 python package 上发送消息?

[英]How to send messages on twisted python package without encoding and decoding?

I want to send the messages as numbers without enc-dec to string.我想将消息作为没有 enc-dec 的数字发送到字符串。

Do you understand why encoding and decoding is necessary?你明白为什么需要编码和解码吗? Data is passed through networks as bytes.数据以字节的形式通过网络传递。 Applications are responsible for translating bytes to and from higher level data structures.应用程序负责将字节与更高级别的数据结构相互转换。 To be very blunt, you cannot send/receive messages without encoding and decoding to bytes.坦率地说,您无法在不编码和解码为字节的情况下发送/接收消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM