Home > Back-end >  Idtcpserver readbuffer read data problems
Idtcpserver readbuffer read data problems

Time:09-25

Before there is a problem, consult everybody, I have a set of PC program is used to communicate with the terminal serial port communication, terminal now changed to TCP, PC sends commands to the machine, a machine under response data to the PC, a serial port communication program is written to all the sending and receiving a function, the way of question and answer, by a machine under the returned data to determine whether a machine under execution, right now I write the TCP also do the same thing, send and receive are also written in the book of a function (Sendbuffer, and the method of Writebuffer), send and receive all have no problem, but the lower machine send instructions to disconnect, PC idTCPserver disconnect event is not triggered, Internet, the net friend say this question also has appeared idTCPserver receiving data in the EXECUTE idTCPserver to write, if without receiving of the EXECUTE code, will not respond to disconnect, but my asking a set of instructions a lot, used to send and receive function has been written, if you want to lay the EXECUTE wrote a lot of work but also a lot of branch, has a master can give you a solution, and I was written in the delphi7 program (formerly program was written by delphi7), 9 version of id control is their own, the control bug, see someone says 9 version of the online communication problems sometimes

CodePudding user response:

No one pays attention to the Delphi

CodePudding user response:

To EXECUTE the difficulty that the code you write scalability is not good, you can take to read and write a separate encapsulated into a class, no matter where I call, only need the incoming parameters, so you can take this opportunity to refactor the code, rather than, complain can't integrate
  • Related