Home > Back-end >  Socket client sends instructions how to feedback to the client to the server server
Socket client sends instructions how to feedback to the client to the server server

Time:10-08

For example, I on the client for the send 1 | | account password to server


The server after the search, how to look up to hundreds of information feedback to the client,,,,

C/S


The service side ACC database

Everyone a great god if there is a corresponding database control
The client queries directly, rather than like me on Socket1Read to complete! Send a, return a!
Socket1Read
Using a CASE statement to accept different instruction, the client sends me isn't complicated,


For everyone a great god teach,,,,

CodePudding user response:


How to send the end of the service, the service side is how to send it, this is my understanding,

CodePudding user response:

Paging hair bai, hair so many also does not have what use

CodePudding user response:

Whether it's a few hundred or a few, the XML format is preferred, for example:
1 Account & lt;/account> Password & lt;/password>
1 Account & lt;/account> Password & lt;/password>
Weakness is several times larger data at once,

CodePudding user response:

3/f advice is good, is composed the data according to the format of the XML, and then the client parses the XML file,

CodePudding user response:

Define structure, the application of memory, will query to write data structure, in the form of a memory stream to send, the receiver received after, with flow length divided by the length of the structure directly, to obtain the total, then you know, cycle to get the data, remember at both ends to free memory
  • Related