コード例 #1
0
ファイル: ServerSession.cs プロジェクト: krisives/GRemote
        public ServerListenThread(ServerSession server, List<ConnectedClient> clients, Socket socket)
        {
            this.server = server;
            this.settings = server.Settings;
            this.clients = clients;
            this.socket = socket;

            socket.Bind(new IPEndPoint(settings.IPAddress, settings.Port));
            socket.Listen(20);
        }
コード例 #2
0
ファイル: GRemoteDialog.cs プロジェクト: krisives/GRemote
        /// <summary>
        /// Starts the recording and server.
        /// </summary>
        public bool StartServer()
        {
            sessionDialog.addressBox.Text = "0.0.0.0";
            sessionDialog.portBox.Text = "9999";
            sessionDialog.finishButton.Text = "Begin Recording";

            switch (sessionDialog.ShowDialog())
            {
                case DialogResult.OK:
                    break;
                default:
                    return false;
            }

            if (videoCapture == null)
            {
                videoCapture = new VideoCapture(areaDialog.Width, areaDialog.Height);
                videoCapture.SetPosition(areaDialog.Left, areaDialog.Top);
            }

            videoScreen.SetVideoSize(videoCapture.Width, videoCapture.Height);

            serverSettings.Address = sessionDialog.addressBox.Text;
            serverSettings.PortString = sessionDialog.portBox.Text;

            serverSession = new ServerSession(FFmpeg, videoCapture, serverSettings);
            //serverSession.TargetWindow = areaDialog.TargetWindow;
            serverSession.Preview = videoScreen;
            serverSession.StartServer();
            statusLabel.Text = "Recording...";

            return true;
        }
コード例 #3
0
ファイル: ServerSession.cs プロジェクト: krisives/GRemote
 public ServerWriteThread(ServerSession server, BufferPool outputBuffers, List<ConnectedClient> clients, List<ConnectedClient> killList)
 {
     this.server = server;
     this.outputBuffers = outputBuffers;
     this.clients = clients;
     this.killList = killList;
 }
コード例 #4
0
ファイル: ServerSession.cs プロジェクト: krisives/GRemote
 public ServerReadThread(ServerSession server)
 {
     this.server = server;
 }