Socket transmission of protobuf byte streams by unity Explorer (4) and unityprotobuf
Copyright:This article is the original article, reprint please declare http://www.cnblogs.com/unityExplorer/p/7027659.html
I have already mentioned socket transmission in the previous article. This article mainly talks about reconnection due to disconnection. There is nothing to say. Just go to the code.
1 // I use a coroutine for the reconnection function, and it is not recommended to use a thread to
: To sort out all current sessionsScreen-x help: Added to the conversation called HelpThe above requires three instructions with the use ofIn order to facilitate their own understanding of memory, in the text described underIf a has difficulty in need of B help, B can be remote login to a terminal, using the screen command to realize the display sharing, and Operation synchronization, the steps are as follows:First, A and B are connected to the same terminal, a executes the command Screen-s help
tasks that need to be performed;
predicate: A condition that carries a prior condition check.
2. Example DemoFor example, we will encounter this scenario, in some operations, such as through the Elasticsearch server to query or update operations, we need to connect to the ES server, and before the ES server connection, all the query and update operations need to be blocked. Even after a server connection, we often need to do a heartbeat test on the server to check whether the connectio
can be directly invoked to send data to the Websocketservice object when the binding succeeds. Websocketservice Add the necessary dependencies
First add WebSocket framework dependencies:
Compile ' com.neovisionaries:nv-websocket-client:2.3 '
This is also the framework I found on the Github after a circle selected, the use of a lot of people, the document is complete, and continue to maintain.Also add a Eventbus and Ali JSON framework:
Compile ' com.alibaba:fastjson:1.2.33 '
compile ' org.green
Method One: Clear the cache
Click "Settings" → in the "Application" program management to find "micro-letter", click "Clear Cache";
Method Two: Replace the access point, reconnect the network
1. In your phone we click "Settings"-"Wireless and Network"-"mobile network"-"Access Point Name" as shown in the picture
2. Then after we click on another access point, the phone will automatically switch to another access point and
corresponds to a server, which is used to specify the Server-id from the server. The default is-1.
--to-last-log: On behalf of Mysqlbinlog not only be able to obtain the specified Binlog, but also to obtain the resulting binlog, obtained after the end. If the--stop-never option is specified, the--to-last-log option is implicitly opened.
--result-file: Used to set the binlog of the remote server and save it to a local prefix. For example, for mysql-bin.000001, if you specify--result-file=/test
idle, waiting to perform a new update operation on Master to generate new events in the binary log and then read them.
Waiting to finalize termination
The current thread has stopped, this time is very short.
6.3.2 slave I/O thread state
The following is a list of the most common states in the slave I/O thread state field. Starting with the MySQL 4.1.1, this state is also present in the Slave_io_state field that executes the results of the show SLAVE status statement. This means that more
Failure phenomena:
When using Wi-Fi, it is often dropped or restricted, or there is a yellow exclamation mark on the Internet sign in the lower right corner, as shown in the following image:
Solution:
1. First check the wireless signal strength is good (please refer to the following image), generally more than three more stable, if the signal is less than three, it is due to signal instability caused by the lack of internet access or often dropped. If your network environment signal is r
transform. Typically used in conjunction with the--batch option. --reconnect//If the connection to the server is broken, automatically attempts to reconnect. No reconnection, use--disable-reconnect. -S,--silent//one-line output, tab-delimited in the middle-S,--socket=name//Sockey file that connects to the server--ssl//Activate SSL connection, do not activate--sk
search, plus by default-N,--skip-column-names//Do not display column information-O,--set-variable=name//Set Variable usage is--set-variable=var_name=var_value--sigint-ignore//Ignore SIGINT symbol (results of control-c when logging out)-O,--one-database//ignores statements except for the default database named in the command line. You can help skip updates to other databases in the log.--pager[=name]//Use a pager to display the query output, this to Linux can be used more,less and so on.--no-pag
--protocol=name//What protocol to use -Q,--quick//Do not cache the results of the query, sequentially print each row. If the output is suspended, the server slows down and MySQL does not use the history file. -R,--raw//writes the value of the column without escaping the conversion. Typically used in conjunction with the--batch option. --reconnect//If the connection to the server is broken, automatically try to
the default redirect file name with ">filename 2>1".In fact, Nohup is just one of the solutions, and Linux provides us with a more powerful screen command to solve this problem.Second, screenIn fact, the previous question is just the tip of the screen feature, which will be described in detail here.In a nutshell, a window manager or proxy that can multiplex a physical terminal across multiple processes.1. Simple Trilogy(1) Create a session#screen-dms XXXThe above command is used to create a ses
Disconnect Remote Desktop Connection ---------------------------NBSP; due to a protocol error, The client cannot connect to the remote computer. NBSP; Please reconnect to the remote computer. If the client is still unable to connect, contact your network administrator. NBSP; Remote Desktop Connection server times error: The session will be interrupted due to a protocol error. Please reconnect to th
streaming. and automatically determine when to reconnect when disconnected.SSE-enabled browsers include firefox6+, safari5+, opera11+, Chrome, and ios4+ Safari.1. SSE APISSE's JavaScript API is similar to other JavaScript APIs that deliver messages. To book a new time stream, first create a new EventSource (' myevents.php ');Note: The incoming URL must be the same as the page that created the object (the URL pattern, domain, and port are the same). T
Generally we use the most is the HTTP request, but the frequent request may be caused by the pressure of the service is very large, so today talk about WebSocket long connection, one sentence: simple1. What is a long connection?A: A request to connect, lifetime use, you can long-term to maintain the interaction of information, unless the service is hung2, QT inside is how to use the WebSocket for long connection① First add qt + = WebSockets to the Pro file② #include ③ initialization_pdatarecvws
err;
});
Parameters
User: New users (default is one of the earlier).
Password: New password for new user (default is the one earlier).
CharSet: New character Set (default is the one earlier).
DB: New database name (default is the one earlier).
Six, processing server connection disconnect
var db_config = {host: ' localhost ', User: ' Root ', password: ', database: ' Example '};
var connection;
function Handledisconnect () {conn
clears the specified entity (including various State) objects in the session-level cache.Of course, after the session is closed, these caches do not exist and wait for the JVM to recycle.5, session of the Flush () method Flush () forces the entity objects in the session cache to be persisted. Clear () or evict () is generally invoked to quickly save and release valuable memory resources.6, the session of the Commit ()/rollback () method The commit () method is used to commit transactions on the
brush machine failure or the progress bar stuck for a long time does not move. Please close the client and reconnect the watch, waiting for the client to recognize the watch.
If it is not recognized, follow the steps to try:
(1) If the current watch has been started normally, please turn off the watch, such as unable to "remote shutdown" off the watch, need to complete discharge
(2) Open the Brush machine tool and click "Co
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.