Home > Net >  I want to achieve in your web page in the diagram function, if there is a way to source what to writ
I want to achieve in your web page in the diagram function, if there is a way to source what to writ

Time:09-19

CodePudding user response:

Send the specified IP content? I said I can understand the thinking of ha, in the first database maintenance an IP tables all IP + port safeguard, then in the content box input code detection after input the IP + port does exist, there is no hint, there will be content in the table in the database state not to send, and then write a service in an area page per minute, query the database table of contents, if it is the content of the current page IP + port is assigned to display controls the query and changed the status to sent don't know whether you want such a mean?

CodePudding user response:

If you are the only winform procedure.. So easy..

Drag a few control no more than 10 lines of code can get..

But but but you said this is a web page.. This is more complicated.

First page does not support you this "long connection.". So I need a transit...

Then your server will be able to receive the websocket protocol.


Then you TCP server is trouble to receive regular, to parse the websocket protocol and TCP/IP communications.. And can freely forward these two messages..


Pseudo code probably as follows..

 
Var list_tcp=new list (a);
Var list_web=new list (a);
Var socket=new xxxsocketSERVER ();
Socket. The onmessage (MSG)=& gt;
{
If MSG. Source==TCP
List_tcp. Add (MSG) socket);
List_web. Find (d=& gt; D.i p + port=MSG. Iop + port). The send (MSG));
If MSG. Source==web
List_web. Add (MSG) socket)
If the MSG.=send operations
List. TCP. The find (d=& gt; D.i p + port==MSG. IP + port). The send information (MSG));



}



Write not bottom go to... More troublesome so I think you come and play winform first...

CodePudding user response:

I originally want to do a TCP transport command of remote control to control the single-chip computer, but I think a page as software to simple, so I want to look at web pages can not be performed TCP transport command

CodePudding user response:

Can, the server can be replaced with a socket send, for TCP, not send upper-layer protocol has not just two
  • Related