实现和设计客户端服务器应用程序的协议
我只是在研究如何实现和设计一个协议,但我不知道如何开始!
让我们以 LDAP 协议为例,我有 rfc 和 asn1 语法规范。
现在,我如何开始开发服务器,使符合 RFC LDAPp 的客户端可以与我通信而不会出现任何问题?
LDAP 这只是一个例子,我可以实现 FTP 或自定义协议。
但我想确保一旦定义了协议,我对任何客户端都是标准的,即使实现不同。
那么到底是哪种沟通方式呢?
你能提供一些好的起点吗?
谢谢
P.S:我想用 python 实现服务器,但这根据我所说的并不重要。
I'm just investigating about implementing and designing a protocol, but I'm stucked on how to start!
Let's take an example the LDAP protocol, I have the rfc and I have the asn1 grammar specification.
Now How can I start developing a server in a such a way that a client compliant to the RFC LDAp can communicate with me without having any kind of problem?
LDAP it's just an example, I can implement FTP, or custom protocol.
But I want to be sure that I am standard for any client once the protocol is defined, even if the implementation is different.
So which is the way of communication?
Can you give some good starting points?
Thanks
P.S: I would like to implement the server in python but that's not important according what I said.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从 asn.1 库开始。然后制作一个服务器来执行 RFC 规定的操作。协议就像 API,只是您必须实现核心而不是包装器。您可以通过 TCP 等传输协议传送 LDAP(或 FTP)消息。如果您需要帮助制作服务器,您可能需要查看 twisted。
Start with an asn.1 library. Then make a server that does what the RFC says to do. Protocols are like APIs, only you have to implement the guts instead of the wrapper. You communicate LDAP (or FTP) messages over a transport protocol like TCP. If you need help making a server, you might want to look into twisted.