The NETWORKCOMMS communication Framework is a communication framework written by the British C # language that lasted 6 years and was developed to be stable and reliable in performance.
The core function of Networkcomms V3 is to some extent asynchronous in its own way.
NETWORKCOMMS provides the functionality to synchronize the request data and get the corresponding corresponding, very simple.
Try{ //Connection information classConnectionInfo ConnectionInfo =NewConnectionInfo ("127.0.0.1",10000); //Get a TCP connectionTcpconnection serverconnection =tcpconnection.getconnection (ConnectionInfo); //Send a message type is "Requestcustomobject", the data type is int, the specific value is "1000" data to the server, and get the message type "Customobjectreply", Data of type CustomObject CustomObject Mycustomobject = serverconnection.sendreceiveobject<customobject> ("Requestcustomobject","customobjectreply", +); }Catch(expectedreturntimeoutexception) {}
The corresponding processing method on the server:
networkcomms.appendglobalincomingpackethandler<int> ("requestcustomobject" , (packetheader, connection, input) = = { //Create a type to return new CustomObject (); //Send the type to be returned to the client Connection. SendObject ("customobjectreply", Mycustomobject); });
Original: http://www.networkcomms.net/synchronous-send-and-receive/
Www.networkcomms.cn Finishing
Networkcomms V3 Synchronous Transceiver Data