private void OnNewClient(object sender, SocketData socketdata) { var client = new RTMPEndpoint(socketdata.Socket); client.OnConnect += OnConnect; client.OnCreateStream += OnCreateStream; client.OnReleaseStream += OnReleaseStream; client.OnFCPublish += OnFCPublish; client.OnPublish += OnPublish; clients.Add(client); }
private void OnData( object sender, SocketData socketData ) { var data = socketData.Data; currentData = ArrayUtil.ConcatArrays(currentData, data); var parsedBytesCount = 1; while ( parsedBytesCount > 0) { parsedBytesCount = ParseReceivedData(); currentData = ArrayUtil.Right(currentData, parsedBytesCount); } }