Esempio n. 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();
        }
Esempio n. 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;
 }
Esempio n. 3
0
 public TrackBar(SyncrPlayer s)
 {
     InitializeComponent();
     sync = s;
 }