Home > Net >  Webserveice can do inside the socket
Webserveice can do inside the socket

Time:09-24

Recently had an led the case, we directly control the led display, is based on the TCP protocol, because there are so many, we are the service side, led is the client, every 30 seconds to send a heartbeat package, if there is no reply will be five times to initiate connections, but there is a problem,, led display the contents of the above is not what we control, is to send it to other departments, now write a webserveice idea is that we let them call, then received the data I forwarded to the led, but just don't know can always and led communication webserveice? How to implement?

CodePudding user response:

Will and later supports.net. TCP, but for the time being, don't know how to achieve your demand
I suggest that written in C/S, rather than webserveice, they are more regular

CodePudding user response:

Webservice is not very good do.. This use winservice.

Rev. A tcpserver with respect to OK.

CodePudding user response:

Please open the mentality,

He did his, you, you do not need to tangle technology, qualified technology,

If your webserveice put things into a text, you can monitor the text?
If your webserveice wrote the database, you can monitor the database
If your webserveice to MQ you can subscribe to news
If your webserveice to Redis, Etcd, would you listen to that node cosorl change notice
If, in your webserveice to kafka, you will receive a message
If, through your webserveice netmq here, using akka.net, using the part that goes from the city, you will not be foreign news
If your webserveice write message in Windows log in, you will immediately receive the log message


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
A watershed, man said this was the pack B, yes, you installed B, but simple and convenient to solve the problem
Please come the water front man, don't pack B, but don't give the solution to solve the problem

CodePudding user response:

In fact, you will find that, in the middle of a pile of the above things, there is an intermediary (except netmq, akka.net, part that goes from, GRPC is direct call)

Why mediation, for he alone because you don't need to do,
Their separation, isolation, and they do, you do your, you can now immediately development effect, they also can get effect instantly development

The most simple, for example, a device corresponding to a number, according to the number for me to write a TXT text, ok

Development, right now can you go to a directory read 123457. TXT text, and under surveillance, monitoring file changes, the 20 points out
Each other, go to the directory change 123457. TXT file code 20 minutes

Are behind (Mq, Redis, Etcd cosorl) is the same way, the only difference is, to a directory "" perhaps not in the machine, to the unified operation, to a common processing with notifications (incidentally also put high concurrency, high availability problem solving) thing to fix

CodePudding user response:

Habit is can, of course, but in terms of the TCP server generally without a web application to do, in your web applications as a TCP client calls the TCP server of others, this is very normal,

CodePudding user response:

Can, you can get a thread to start a socket service, but to prevent IIS automatic recovery,

CodePudding user response:

Kung fu panda has said to you, don't, you hang your WebService, after he lost the data into your database, you have the data socket monitoring to the database, to launch go, have a snakeskin?

CodePudding user response:

refer to 7th floor rabbit family - second brother reply:
kung fu panda has said to you, don't, you hang your WebService, after he lost the data into your database, you have the data socket monitoring to the database, to launch go, have a snakeskin?
now, I just want to associated, when the data is forwarded to immediately led by websevices can mean do a API and data forwarding as one of the program, when the API or websevices received data immediately forwarded to the led, and I don't want to do two procedures, an interface, a forward

CodePudding user response:

Should be the function of the server to forward a program, for example, we qq chat, we are not the direct communication should be server forwarding
  •  Tags:  
  • C #
  • Related