简体   繁体   English

实现和设计客户端服务器应用程序的协议

[英]Implementing and Designing a protocol for client server application

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. 让我们以LDAP协议为例,我有rfc,我有asn1语法规范。

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? 现在,我如何开始开发服务器,使符合RFC LDAp的客户端可以与我通信而不会出现任何问题?

LDAP it's just an example, I can implement FTP, or custom protocol. LDAP只是一个例子,我可以实现FTP或自定义协议。

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 谢谢

PS: I would like to implement the server in python but that's not important according what I said. PS:我想在python中实现服务器,但根据我的说法,这并不重要。

Start with an asn.1 library. asn.1库开始。 Then make a server that does what the RFC says to do. 然后创建一个服务器来完成RFC所要做的事情。 Protocols are like APIs, only you have to implement the guts instead of the wrapper. 协议就像API,只需要实现内核而不是包装器。 You communicate LDAP (or FTP) messages over a transport protocol like TCP. 您通过诸如TCP之类的传输协议传达LDAP(或FTP)消息。 If you need help making a server, you might want to look into twisted . 如果您需要帮助制作服务器,您可能需要考虑扭曲

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

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