Home > other >  C + + program can be implemented at the same time compatible with the websocket server and socket cl
C + + program can be implemented at the same time compatible with the websocket server and socket cl

Time:09-16

C + + program can be implemented at the same time compatible with the websocket server and socket client?
I now have a socket server (has been completed, cannot be modified), now need to HTML browser communication, can not turn can add a similar interface program (c + + implementation), can receive data from the socket server (ACTS as a socket client), at the same time, data can be received to p browser page (ACTS as a websocket server), excuse me everybody can realize the great spirit from the technical? Or you have any better Suggestions? Thank you very much!

CodePudding user response:

I think you are not the original server support HTTP service, so it is unable to use a browser to access the original server data, so you have such demand, your implementation approach is completely feasible, as now, the most common type of database application system, database server, WEB server (from the database server, WEB server is the client, look from the browser and the WEB server is the server), browser,
Its essence is to be a WEB application, but the use of c + + to realize WEB site, is technically feasible, but from the development efficiency is not the best, common WEB development language such as JAVA, c # PHP, and there are many mature framework can be used,

CodePudding user response:

reference 1st floor weixin_40290083 response:
I think you are not the original server support HTTP service, so it is unable to use a browser to access the original server data, so you have such demand, your implementation approach is completely feasible, as now, the most common type of database application system, database server, WEB server (from the database server, WEB server is the client, look from the browser, the WEB server is the server), browser,
Its essence is to be a WEB application, but the use of c + + to realize WEB site, is technically feasible, but from the development efficiency is not the best, common WEB development language such as JAVA, c # PHP, and there are a lot of mature framework can be used,
yes, is to be a WEB application, do you have any Suggestions? I will be a little PHP, c # are not ripe, we now the question is before the socket server does not change, have to do now web database applications don't direct operation, use socket server before the scheduled protocol data obtained from the server database, that is to say, this part must be using socket communication?

CodePudding user response:

In use the socket communication, don't say to modify the original socket server, you put the original socket server as your application data source is good,

CodePudding user response:

reference weixin_40290083 reply: 3/f
to use the socket communication, did not say to modify the original socket server, you put the original socket server as your application data source is good,

Did you democode excuse me? Just contact network communication, the idea is not clear, or pseudo code can, websoket communication and socket communication is to handle in the two threads?

CodePudding user response:

Such democode is no ah, in the same thread or on two different threads, depends on your business needs,
  • Related