예제 #1
0
        public SyncrUDPHost(SyncrPlayer sync)
        {
            syncr = sync;

            ReceiveClient = new UdpClient();
            ReceiveClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
            ReceiveClient.Client.Bind(new IPEndPoint(IPAddress.Loopback, Port));

            //sendClient = new UdpClient();
            //sendClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);

            ClientConnections = new Dictionary <int, ClientConnection>();

            Thread thread = new Thread(ListenThread);

            thread.Start();

            Thread updateThread = new Thread(Update);

            updateThread.Start();

            Thread sendThread = new Thread(SendThread);

            sendThread.Start();
        }
예제 #2
0
 public SilentRunner(Score s, ProcessLoadDelagete processDelegate, bool autoStart)
 {
     ProcessDelegate = processDelegate;
     syncr           = new SyncrPlayer();
     tempo           = new Tempo();
     triggers        = new List <Trigger>();
     udpHost         = new SyncrUDPHost(syncr);
     _fastLoop       = new FastLoop(Update);
     score           = s;
     AutoStart       = autoStart;
 }
예제 #3
0
파일: TrackBar.cs 프로젝트: msf567/Syncr
 public TrackBar(SyncrPlayer s)
 {
     InitializeComponent();
     sync = s;
 }