开发者

How to implement a protocol

开发者 https://www.devze.com 2023-01-25 18:11 出处:网络
are there any open source desktop sharing protocols? if so, what are they? can anybody tell me the things i would know in order to implement a protocol e.g if i want to write a desktop sharing protoco

are there any open source desktop sharing protocols? if so, what are they? can anybody tell me the things i would know in order to implement a protocol e.g if i want to write a desktop sharing protocol what are the things i nee开发者_StackOverflow中文版d to know and from where i should begin.(preferred languages Java, C++ and C#)

Thanks !!


RFB is the protocol used in VNC applications, and it is an open specification.

A protocol is just a language that networked applications 'agree' to speak. That is to say, because both ends of the connection are speaking the same language (meaning they know what bytes mean what in the communication) they are capable of sending meaningful information to one another and interpreting the information they receive.

Therefore, the first thing you should do before implementing a protocol is to learn and understand it. Often (and always in the case of open specifications) there will be a document that explains the protocol and all the ins and outs. For example, the specification for the RFB protocol can be found here.

Read it and implement a program that can understand RFB and you will have created an RFB implementation.

As for the preferred language bit: a protocol doesn't stipulate what language the protocol is implemented in, just the way that communication takes place, so you can implement it in whatever language you wish.


The VNC protocol(*) has many open source implementations, and actually the Microsoft RDP protocol has also a few open source implementations.

Protocols cannot be "open source" actually - they can be "open" as in "the specifications are publicly available for free" and they can be "open source compatible" as in "if you implement the protocol in an open source program we won't sure your add off", but usually "open source" means that you can change the source and changing a protocol would not really be beneficial because you then won't be able to inter-operate, right?

For a Microsoft RDP open source client look at rdesktop and the xrdp project is implementing the server side on top of the X11 display protocol. VNC implementations are a dime a dozen, but for starters you might want to look at tightvnc or realvnc

(*) Actually RFB is the protocol used in VNC compatible clients, as noted by Paul Ruane, and VNC is the name of the original software suite and is also used as the generic term for a software that implements RFB and employs the same networking semantics as the original VNC client.

0

精彩评论

暂无评论...
验证码 换一张
取 消