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.
client and server in Tcp Protocol, don't think about TcpClient and TcpListener anymore!

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).

0 comments  

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

0 comments  

What is your RASI?

Janma Nakshatra (Birth Star)

Each one of us is born under one of 27 nakshatras. This is also known as one's janma nakshatra or birth nakshatra. Some also refer to this as the birth star even though that terminology is not quite precise since a nakshtra can be much more than just one star.

27 Nakshatras in a Great Circle

Imagine a great circle in space and the 27 nakshatras laid out equally on this circle. Since a circle covers 360 degrees, these 27 nakshatrams cover 360 degrees in space.
So the "space" occupied by one nakshatram is 360 divided by 27 which is equal to 13 degrees and 20 minutes.

12 Raasis in the Same Great Circle

Now instead of dividing these 360 degrees by 27 divide them by 12. If you do that, you get 12 raasis.

12 Raasis = 27 Nakshatras!

1 Raasi = 2 and 1/4 Nakshatras

The space occupied by the 12 rashis is the same space occupied by the 27 nakshatras. Thus each one of us has a janma rasi just like we have a janma nakshatra. You can think of the 12 rasis as another way of grouping the 27 nakshatras.

Since 12 rasis = 27 nakshatras, one raasi = two and a quarter nakshatras (since 27 divided by 12 = 2 and 1/4). In other words, the 27 nakshatras are grouped under 12 rasis at two and a quarter nakshtras per raasi.
As you can see, a nakshatra can occupy a part of one rasi and a part of the next rasi (as laid out in the table below). This is the case for 9 of the 27 nakshatras. These 9 are: Kritika, Mrigasira, Punarvasu, Uttara Phalguni, Chitra, Visaka, Uttarashada, Dhanishta and Poorvabhadra are partly in one rasi and partly in another.
But if each nakshatra is divided into 4 equal quarters, a quarter will never occupy more than one rasi. This higher precision division of each nakshatra into quarters has been done.

Nakshatra Paadham = 4 Quarters of each nakshatra

The space occupied by each naksatra (in the great circle) is divided into four equal quarters. Since there are 27 nakshatras, there are 108 nakshatra quarters (27 x 4 = 108) in total with each quarter spanning 3 degrees and 20 minutes of the great circle.
Each quarter of each nakshatra will never span two rasis; each quarter will be part of one and only one rasi.
Each such nakshatra quarter is referred to as a Nakshatra Paadham or Nakshatra Pada.
When you hear people make statements such as "My nakshatra is Punarvasu 2nd padham" or "My birth star is Vishaka 4th quarter" and so on, they are referring to this finer division of each nakshatra into quarters.
Our nakshatra calculator below will also calculate the nakshatra pada for you.


Rasi - Nakshatra Table

Use the following table to find out your janma rasi from your janma nakshatra.

RASINAKSHATRA
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 Sri Bhava Oushadeeswara Temple Thiruthuraipoondi near Mannargudi in Nagapattinam District in Tamil Nadu
2. Barani (Apa Bharani) Birth Star Temple Sri Agneeswara Temple Nallaadai on the Mayiladuthurai - Nagapattinam Road in Tamil Nadu about 20 km from Mayiladuturai and 3 km from Poraiyaar
3. Karthigai (Krittika) Birth Star Temple Sri Kaatra Sundareswara Temple Kanjanagaram on the Mayiladuthurai - Keezhaiyur - Poompuhar route in Tamil Nadu about 5 km from Mayiladuturai
4. Rohini Birth Star Temple Sri Pandava Dhoota Krishna Perumal Temple Kanchipuram (temple town) in Tamil Nadu. This temple is near Kumarakottam which is near the famous Kamakshi Temple
5. Mirugaseerisham (Mrigaseersha, Mrigasira) Birth Star Temple Sri Adi Narayana Temple EnKan on the Thanjavur - Koradacheri - Tiruvaruyr route in Tamil Nadu about 13 km from Koradacheri
6. ThiruAdhirai (Arudra) Birth Star Temple Sri Abhaya Varadeeswarar Temple AdiRamPattinam near Pattukottai in Thanjavur District in Tamil Nadu about 12 km from Pattukottai
7. Punarpoosam (Punarvasu) Birth Star Temple Sri Atiteeswarar Temple Vaniyambadi in North Arcot District on the Vellore - Aambut - Vaniyampadi - Tirupattur route in Tamil Nadu
8. Poosam (Pushya) Birth Star Temple Sri Akshayapureeswarar Temple Vilangulam in Thanjavur District some 20 km from Peravurani in Tamil Nadu. First get to Peravurani from Pudukottai or Karaikudi or Pattukottai or Thanjavur. Then get to Vilankulam.
9. Aayilyam (Aslesha, Ayilyam) Birth Star Temple Sri Karkateswarar Temple (locally known as Nandaangovil) ThirundhuDevankudi some 11 km from Kumbakonam temple town in Tamil Nadu
10. Magham (Magha, Makam) Birth Star Temple Sri Mahalinga Swami Temple Thavasimadai on the Dindigul - Nattam route in Tamil Nadu some 25 km from Dindigul.
11. Pooram (Poorva Phalguni, Pubba) Birth Star Temple Sri Hari Theertheswarar Temple Thiruvarangulam on the Pudukottai - Pattukottai route in Tamil Nadu some 10 km from Pudukottai
12. Uttiram (Uttara Phalguni) Birth Star Temple Sri Mangalyeswarar Temple Idaiyatrumangalam on the Trichy - Valadi - Pachampattu - Mandhurai - Lalgudi route in Tamil Nadu
13. Hastham (Hasta) Birth Star Temple Sri Krupakoopareswarar Temple Komal on the Kumbakonam - Mayiladuthurai route in Tamil Nadu some 6 km from Kuttalam
14. Chitirai (Chitra) Birth Star Temple Sri Chitra Ratha Vallabha Perumal Temple Kuruvithurai in Madurai District in Tamil Nadu some 8 km from Cholavandhan
15. Svaati (Swati) Birth Star Temple Mother Prasanna Kundhalambika and Sri Tantreeswarar Temple
and Sri Sundararaja Perumal Temple
Sittukadu some 10 km from Poonamallee (near Chennai) in Tamil Nadu on the Poonamallee - Pattabiram route
16. Visakam (Vishaka) Birth Star Temple Sri Muruga Temple Thirumalai some 7 km from Shencottah and 15 km from Tenkasi in Tirunelveli District in Tamil Nadu
17. Anusham (Anusha) Birth Star Temple Sri Lakhmsipureeswarar Temple Thirunindriyur some 7 km from Mayiladuthurai on the Mayiladuthurai - Sirkazhi route in Thanjavur District in Tamil Nadu
18. Kettai (Jyeshta, Jyestha) Birth Star Temple Sri Varadaraja Temple Pasupati Koil some 12 km from Thanjavur on the Thanjavur - Kumbakonam route in Thanjavur District in Tamil Nadu
19. Moolam (Mula, Moola) Birth Star Temple Sri Singeeswarar Temple Mappedu some 40 km from Chennai on the chennai - Thakkolam route in Tamil Nadu
20. Pooradam (Poorvashada, Purvashada, Puram) Birth Star Temple Sri Akasapureeswarar Temple Kaduveli near Thiruvaiyaru in Thanjavur District in Tamil Nadu
21. Uttiradam (Uttarashada, Uthiradam) Birth Star Temple Mother Meenakshi and Sri Sundareswarar Temple Keezhapoongudi on the Melur - Sivaganga route in Madurai District in Tamil Nadu
22. Thiruvonam (Sravana, Tiruvonam) Birth Star Temple Mother Alarmelmanga and Sri Prasanna Venkatesa PerumalTemple Thiruparkadal on the Chennai - Vellore route some 4 km from Kaveripakkam in Tamil Nadu
23. Avittam (Dhanista, Sravista) Birth Star Temple Mother Pushpavalli and Sri BrahmaGnanaPureeswarar Temple Korukkai near Kumbakonam on the Patteeswaram - Muzhaiyur route some 5 km from Kumbakonam bus stand in Tamil Nadu
24. Sadayam (Sathabhishak) Birth Star Temple Mother Karundharkuzhali and Sri Agneeswarar Temple Thirupugaloor some 10 km from Nannilam on the Kumbakonam - Nannilam - Nagapattinam route in Thanjavur District in Tamil Nadu
25. Pooratadhi (Poorvabhadra) Birth Star Temple Mother Kamakshi and Sri ThiruAneswarar Temple Renganathapuram some 10 km from Thirukattupalli on the Tirukattupalli - Koviladi route in Thanjavur District in Tamil Nadu
26. Uttiratadhi (Uttarabhadra) Birth Star Temple Sri Sahasra Lakshmeeswarar Temple Theeyathur some 15 km from Avudaiyar Kovil in Pudukottai District on the Avudaiyar Kovil - Thirupunnavasal route in Tamil Nadu
27. Revathi (Revati) Birth Star Temple Mother Karunakaravalli and Sri Kailasanathar Temple Kaarukudi some 2 km north of Tattayangarpettai and 1.5 km west of Mettupalayam in Musuri Taluk, Trichy District in Tamil Nadu

 

 


2 comments