Build TCP Protocol using C#
Build TCP Protocol using C#
With few steps, C# code for your TCP protocol will be ready, the structure of any TCP protocol generated by .Net Protocol Builder can be described in the following diagram, please note that the generated code is Multi-threaded server and non blocking client connection.
One or more Request Packets | The answer can be | One or more Response Packets |
One or more Two-Way Packets | ||
One or more Two-Way Packets | The answer can be | One or more Response Packets |
One or more Two-Way Packets | ||
One Event | The answer can be | NO answer |
Packets are chunk of data containing your own Fields, Packet ID, Packet Type, Packet Start, Packet End, and some constraints on length, all of these factors are generated automatically by .Net protocol Builder, at the end you will deal with packets as objects with some member variables, these variables are your Fields. Fields can be of the type: string, DateTime, double, all kinds of integers, and an array of bytes (byte[]), keep reading to know what is the difference between all packet types.
Request Packets:
Request packets are sent from client to server only; we can send one or more request packets to the server to get one or more response packets. Requests can be accompanied by two way packets.
Response Packets:
Response packets are sent from server to client only; we can send one or more response packets to the client as a response for its request(s). Responses can be accompanied by two way packets.
Two Way Packets:
Two Way Packets are sent from server to client or from client to server; we can send one or more two way packets from both sides. two way packets can be accompanied by responses and requests.
Event Packets:
Event Packets are sent from client to server only; we can send only one Event packet at a time, they can be used to inform the server about an event occurring at the client side. Event packet is received by the server silently, i.e. there will be no response from the server to the client.
Now, Download .Net Protocol Builder for Free, and follow these simple instructions:
· Select the Protocol node then Set the Protocol Name Use short name for your protocol, keep all other settings with default values.
· To add a packet select the suitable packet type under the protocol node, right click the node and click add packet (you may change its name).
· To add a Field right click on the packet node and click Add Field (you may change its name and type).
Generating Protocol Code and its Documentation
After adding all packets and fields, you can generate the C# code by selecting Generate Code from the tools menu or use the Keyboard shortcut Ctrl+G, the program will prompt you to select the path of the working directory if you have not done so, your protocol files will be saved inside a new folder called Protocol prefixed with your protocol name. Congratulations!! Your protocol code is ready to be added to your own project. Try it Now
Protocol documentation in .docx format can be generated by selecting “Generate Protocol Documentation” from the tools menu or by selecting Ctrl+D, this will generate new file called “Protocol Documentation.docx” prefixed with your protocol name, this file will be saved in the protocol folder in the current working directory. Note that Word 2007 is required to generate this type of documentation.
The documentation in .txt format will be generated automatically each time you generate the protocol code, so this type of documentation is consistent with your protocol all the time, where you have to make sure to generate the .docx documentation each time you change the design of your protocol.
Saving your protocol
Anytime you can save your protocol design by selecting Save from the File menu and Open it later by selecting Open from the File Menu. If you have designed your protocol using the Trial version the standard edition is able to open your file.
Click here to download pdf slides file which explains the basic concepts to build your TCP protocol in C#
Click here to download pdf help file for .Net Protocol Builder (the trial version help file has the same information).
How to shutdown after some time??
Hi some process is running in your PC it will over after 30mins. But you can't stay there until process is over. If you want to shutdown your pc after certen time then use below command in cmd
1) start > Run > cmd
then type as
shutdown /s /f /t 1800
1800 is the time, After howmany seconds you want to shutdown your PC.
If you don't want your shutdown then type this
shutdown /a
What is your RASI?
Janma Nakshatra (Birth Star)
27 Nakshatras in a Great Circle
12 Raasis in the Same Great Circle
12 Raasis = 27 Nakshatras!
1 Raasi = 2 and 1/4 Nakshatras
Nakshatra Paadham = 4 Quarters of each nakshatra
Rasi - Nakshatra Table
RASI | NAKSHATRA |
Mesha | - Aswini (Asvini) - Apa Bharani (Barani) - first quarter of Krittika (Karthigai) |
Vrishabha | - last three quarters of Krittika (Karthigai) - Rohini - first half of Mrigasira (Mrigaseersham) |
Mithuna | - second half of Mrigasira (Mrigaseersham) - Ardra (Thiruvadhirai) - first three quarters of Punarvasu (Punarpoosam) |
Kataka | - last quarter of Punarvasu (Punarpoosam) - Pushyami (Poosam) - Aslesha (Ayilyam) |
Simha | - Makha (Magham) - Poorva Phalguni (Pooram) - first quarter of Uttara Phalguni (Uttaram) |
Kanya | - last three quarters of Uttara Phalguni (Uttaram) - Hasta (Hastham) - first half of Chitra (Chittirai) |
Thula | - second half of Chitra (Chittirai) - Swati (Swathi) - first three quarters of Visakha (Visakham) |
Vrischika | - last quarter of Visakha (Visakham) - Anuradha (Anusham) - Jyeshta (Kettai) |
Dhanus | - Moola (Moolam) - Poorvashada (Pooradam) - first quarter of Uttarashada (Uttiradam) |
Makara | - last three quarters of Uttarashada (Uttiradam) - Sravana (Thiruvonam) - first half of Dhanishta (Avittam) |
Kumbha | - second half of Dhanishta (Avittam) - Satabhishak (Sadhayam) - first three quarters of Poorvabhadra (Pooratadhi) |
Meena | - last quarter of Poorvabhadra (Pooratadhi) - Uttarabhadra (Uttiratadhi) - Revati (Revathi) |
The 12 Rasis
and the Lords who own them

The 27 Nakshatras in the 12 Rasis
- Which Nakshatram in which Raasi
YOUR NAKSHATRA (Birth Star) | TEMPLE FOR YOU | LOCATION OF TEMPLE | |
1. | Asvini (Ashwini) Birth Star Temple | ||
2. | Barani (Apa Bharani) Birth Star Temple | ||
3. | Karthigai (Krittika) Birth Star Temple | ||
4. | Rohini Birth Star Temple | ||
5. | Mirugaseerisham (Mrigaseersha, Mrigasira) Birth Star Temple | ||
6. | ThiruAdhirai (Arudra) Birth Star Temple | ||
7. | Punarpoosam (Punarvasu) Birth Star Temple | ||
8. | Poosam (Pushya) Birth Star Temple | ||
9. | Aayilyam (Aslesha, Ayilyam) Birth Star Temple | ||
10. | Magham (Magha, Makam) Birth Star Temple | ||
11. | Pooram (Poorva Phalguni, Pubba) Birth Star Temple | ||
12. | Uttiram (Uttara Phalguni) Birth Star Temple | ||
13. | Hastham (Hasta) Birth Star Temple | ||
14. | Chitirai (Chitra) Birth Star Temple | ||
15. | Svaati (Swati) Birth Star Temple | and Sri Sundararaja Perumal Temple | |
16. | Visakam (Vishaka) Birth Star Temple | ||
17. | Anusham (Anusha) Birth Star Temple | ||
18. | Kettai (Jyeshta, Jyestha) Birth Star Temple | ||
19. | Moolam (Mula, Moola) Birth Star Temple | ||
20. | Pooradam (Poorvashada, Purvashada, Puram) Birth Star Temple | ||
21. | Uttiradam (Uttarashada, Uthiradam) Birth Star Temple | ||
22. | Thiruvonam (Sravana, Tiruvonam) Birth Star Temple | ||
23. | Avittam (Dhanista, Sravista) Birth Star Temple | ||
24. | Sadayam (Sathabhishak) Birth Star Temple | ||
25. | Pooratadhi (Poorvabhadra) Birth Star Temple | ||
26. | Uttiratadhi (Uttarabhadra) Birth Star Temple | ||
27. | Revathi (Revati) Birth Star Temple |
Subscribe to:
Posts (Atom)