A
A
Andrey Smirnov2018-04-07 14:11:34
Java
Andrey Smirnov, 2018-04-07 14:11:34

What is the best way, in terms of speed, to implement the connection between a computer and a phone?

Good day, dear members of the forum) I am writing to you, because I am already tired of googling and it is interesting to listen to live answers to a question that has long interested me. I am writing a program now, and to be precise, two, for android and Windows. The bottom line is, the android program sends control commands to the PC (swipes, clicks, clicks on the virtual / real keyboard, etc.) and the PC, respectively, accepts and processes the whole thing (The position of the mouse cursor changes, mouse clicks are simulated, etc.). Ideally, in the future, implement sending the desktop image to the phone, that is, such a custom version of teamviewer :) And I have very little idea of ​​​​how to make it work together. That is, how to correctly implement the connection, trying now through the socket? What is the best way to handle changes on the UI thread in android, via extra thread or asynctask? Because speed is very important to me. A big thank you in advance to those who will

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
nikel303, 2014-02-23
@nikel303

Probably you will like www.yiiframework.com/doc/guide/1.1/en/topics.url#sec-9

Y
Yuri Morozov, 2014-02-23
@metamorph

You should understand that URLs like /anyword/ immediately break the standard scheme /controller/action/...
There are at least three options for solving the problem:
1. first register all existing controllers, and if it doesn’t fit, redirect to site/index
2. first register all existing "anyword"
3. somehow mark anyword-urls so that it is clear that this is not a controller and not a module.
I prefer to use suffix marking, i.e. not /anyword, but /anyword.html
This is most often consistent with the requirements of SEOs and does not cause problems from points 1 and 2.

E
Egor Mokeev, 2014-02-23
@zetamen

The CNC can do this
Add a rule
In the SiteController add an action

public function actionPost()
{
  $link = Yii::app()->request->getParam('link');
  if ($link == null)
  {
    throw new CHttpException(404, 'The requested page does not exist.');
  }
  $post = Post::model()->findByAttributes(array('link' => $link));
  if ($post == null)
  {
    throw new CHttpException(404, 'The requested page does not exist.');
  }
  $this->render('post', array(
    'model' => $post
  ));
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question