摘要 |
<p>Provided are a communication method and server supporting multiple socket connection modes for solving the problem in the prior art that there exist only communication models for reader programs using single-socket connection modes, which leads to functional shortcomings. The method includes: a server running an upper-level application monitors the link state of the link used in the socket connection between the upper-level application and the reader program, wherein the socket connection includes different communication models; determining, on the basis of the link state being normal, that there is a socket connection between the upper-level application and the reader program and then performing data exchange; and determining, on the basis of the link state being broken, that there is no socket connection between the upper-level application and the reader program and then stopping data exchange. The communication is achieved by obtaining the socket connection status through monitoring of the link state of the link used in the socket connection of different communication types, thereby overcoming the shortcoming that only a single communication model is supported.</p> |