bobbybeeelan 0 Report post Posted May 2, 2009 HiI'm a programmer already but I want to know how to make a Network Protocal.Any Answers?ByeP.S. It must be free forever Share this post Link to post Share on other sites
wutske 0 Report post Posted May 3, 2009 Start with a piece of paper and start writing down everything you want in this protocol, maybe you can even put it in a diagram or something like that. Try to be clear tough because you'll need this information.With this information you'll have to design the messages you want to send between server and client (and vice versa). These messages can be bytestreams, SOAP messages, ... But make sure they are a bit versatile (it's most efficient if all message headers have the same length). Next thing on the list is writing a server and a client, the server listening on a port and the client sending your protocol messages to the server.That the scenario in short Share this post Link to post Share on other sites
bobbybeeelan 0 Report post Posted May 3, 2009 HiThat's a very good answer.Now what do I do remeber all I did is put some info on a peice of paper.Bye Share this post Link to post Share on other sites
tansqrx 0 Report post Posted May 5, 2009 Iâm getting the feeling that you are not very serious in your question but I will still do my best to answer it. The protocol will depend on what you are using it for. A typical application protocol will use many of the existing protocols such as TCP and IP. A fairly complex example of a protocol is the Yahoo! Messenger protocol or YMSG which I have a tutorial for at http://forums.xisto.com/no_longer_exists/ (shameless plug).As I said before, it all depends on the application. Letâs say I need to communicate weather conditions between two points, over the Internet, and using standard PCs. I would first designate one of the computers as a server and the other as a client. Since we are using the Internet, I will use standard TCP/IP. On the server I will create a listening port (in .NET you can use TCPListener - http://forums.xisto.com/no_longer_exists/) and on the client I will initiate a connection (TCPClient - http://forums.xisto.com/no_longer_exists/). Once you issue each command, the operating system takes care of all the tedious work of getting the connection working. Now you have a connection where you can send anything you want until either end closes the connection.In the weather example you may want to send temperature, humidity, and wind speed to the server. Additionally you may also want to identify the client by a unique identifier. All of these things are fairly straight forward so I would just create a string and separate each entry by a colon.ClientID:Temp:Humidity:WindSpeedThe client then issues a send command on the string. The server then receives the string and splits it based on the colons. This is a very simple example but still a network protocol. As long as each field is defined and sent in a particular order, any server will be able to use the weather data that you sent.I suggest you start with the networking objects in the language you are using and then work out from there. Share this post Link to post Share on other sites
yordan 10 Report post Posted May 5, 2009 I would add two fields to this protocol : "from" and "to".It would probably be useful to know which weather station sends the info, and which server is gathering the infos, so two extra fields are needed. Share this post Link to post Share on other sites
bobbybeeelan 0 Report post Posted May 5, 2009 HiThis is great thanks guys.Bye Share this post Link to post Share on other sites
tansqrx 0 Report post Posted May 7, 2009 This is a great example of tailoring your protocol to meet your needs. I was assuming that there is only one server so the “to” field is not needed. The ClientID should take care of your “from”. Of course this all doesn’t matter because it is a fictional system but it shows that you only need one thing for a protocol; knowledge on both ends of what is in the message and how it is ordered. Share this post Link to post Share on other sites