Traditional Culture Encyclopedia - Weather forecast - I have no idea about writing a protocol based on udp protocol with c#, please ask God for advice.
I have no idea about writing a protocol based on udp protocol with c#, please ask God for advice.
The meaning of interface is very broad. When someone calls your interface, how to call it and how to implement it need to be agreed (you and the interface caller agree).
For example, in. NET platform:
This is the service interface. When the interface is written, it will be published on IIS. Other programs (JAVA) or terminals (mobile phones) can call your web interface as long as the HTTP protocol is allowed (you can look at Baidu's API, which is a good example, such as the weather forecast interface, which can be called in various programming languages).
Interface used internally by C#:
For example, in the most common factory method mode, IDAL and IBLL layers are interface layers, and interfaces are the basic things that specify function names, return values and parameters. After the interface is declared, others need to implement it.
Public? Interface? Iudp? //This is the interface.
{
String? get();
}
Public? Class? Udp:Iudp// inheritance interface
{
Public? String? Get()? //Implement the method in the interface.
{
Return? " 1234566";
}
} I suggest you find out what your interface is first. ? Then implement the interface.
It is very simple to send and receive data through UDP, which should be the simplest network programming.
Reference:/dqs78833488/article/details/51331341
Complete listening port, receiving port and closing port, no more than 300 lines of code.
- Related articles
- Why is it so dry in winter?
- There is a magnitude 3 earthquake in Longling, Baoshan. 3. Will an earthquake of magnitude1be dangerous? Will there be aftershocks?
- Introduction to Utrecht
- Introduction of Longdong Tourist Attractions in Jinan One-day Tour in Longdong, Jinan
- Ming-yang Gap and the weather
- Idioms describing the coldness of winter
- What outdoor teaching AIDS can floor mats be used for?
- Truman Show's 10 Classic Lines
- Never paint walls in the rain
- Life perception composition 400 words