图1 服务端监控
4 关键代码
4.1 控制端代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Drawing;
using Client;
namespace RemoteControl
{
public class RevThread
{
public delegate void displayRevData(Point left_top_point,Point right_bottom_point,Image data);
public displayRevData display_rev_data_func;
private const int local_port = 61002;
private UdpClient rev_data_udp;
private Thread rev_data_thread;
public RevThread(displayRevData disp_function)
{
this.display_rev_data_func = disp_function;
ThreadStart ts = new ThreadStart(rev_data);
rev_data_thread = new Thread(ts);
rev_data_thread.Start();
}
public void send_monitor_to_client(string local_ip_address,string dest_ip_address)
{
send_monitor_to_client(local_ip_address,dest_ip_address, false);
}
|