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